package com.maintain.business.domain.bo;

import com.maintain.business.domain.ErpSettlementMaterialInfo;
import com.maintain.common.core.validate.AddGroup;
import com.maintain.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.maintain.common.core.domain.BaseEntity;

/**
 * 结算物料业务对象 erp_settlement_material
 *
 * @author liushuai
 * @date 2025-04-16
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ErpSettlementMaterialBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 结算单号
     */
    private String settlementNumber;

    /**
     * 结算名称
     */
    @NotBlank(message = "结算名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String settlementName;

    /**
     * 结算时间
     */
    @NotNull(message = "结算时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date settlementTime;

    /**
     * 供应商ID
     */
    @NotNull(message = "供应商不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long vendorId;

    /**
     * 供应商名称
     */
    private String vendorName;

    /**
     * 结算方式
     */
    @NotNull(message = "结算方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer settlementType;

    /**
     * 结算金额
     */
    @NotNull(message = "结算金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal settlementMoney;

    /**
     * 状态（1待确认 2已确认）
     */
    private Integer state;

    /**
     * 结算明细列表
     */
    @NotEmpty(message = "结算明细不能为空", groups = { AddGroup.class, EditGroup.class })
    private List<ErpSettlementMaterialInfoBo> infoList;


}
