package org.dromara.personnel.domain.bo;

import org.dromara.personnel.domain.OpsCaigouPlan;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

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

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 运维-物资-采购计划单业务对象 ops_caigou_plan
 *
 * @author LionLi
 * @date 2025-09-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OpsCaigouPlan.class, reverseConvertGenerate = false)
public class OpsCaigouPlanBo extends BaseEntity {

    /**
     * id
     */
    private Long id;

    /**
     * 项目id
     */
    private Long projectId;

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

    /**
     * 计划编号
     */
//    @NotBlank(message = "计划编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String jihuaBianhao;

    /**
     * 采购单位（当前登录人部门）
     */
//    @NotNull(message = "采购单位（当前登录人部门）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long caigouDanwei;

    private String caigouDanweiName;

    /**
     * 经办人
     */
//    @NotNull(message = "经办人不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long jingbanren;

    /**
     * 经办人名称
     */
//    @NotBlank(message = "经办人名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String jingbanrenName;

    /**
     * 合同类型
     */
    @NotBlank(message = "合同类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String hetonType;

    /**
     * 采购类型
     */
    @NotBlank(message = "采购类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String caigouType;

    /**
     * 仓库地址
     */
//    @NotBlank(message = "仓库地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String cangkuUrl;

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

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

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

    /**
     * 付款条件
     */
    @NotBlank(message = "付款条件不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fukuantiaojian;

    /**
     * 发票开具方式
     */
    @NotBlank(message = "发票开具方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fapiaoKjfs;

    /**
     * 提交状态（1、草稿，2、已提交）
     */
//    @NotBlank(message = "提交状态（1、草稿，2、已提交）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 预计金额
     */
    private BigDecimal yujiJine;
    /**
     * 实际已采购金额
     */
    private BigDecimal shijiJine;

    /**
     * 申请原因
     */
    private String reason;

    /**
     * 附件
     */
    private List<OpsCaigouPlanFilesBo>  opsCaigouPlanFilesBos;
    /**
     * 产品信息
     */
    private List<OpsCaigouPlanChanpinBo> opsCaigouPlanChanpinBos;




}
