package com.jwipc.supplier.dto;

import com.jwipc.aggregation.annotation.RelationAggregationField;
import com.jwipc.supplier.service.ISupplierService;
import com.jwipc.sys.client.FileClient;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Data
public class SupplierQualificationBaseDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = -5938560943643047815L;
    private Long id;

    /**
     * 供应商id
     */
    private Long supplierId;
    @RelationAggregationField(
            masterIdField = "supplierId",
            relationIdField = "id",
            relationNameField = "supplierName",
            relationClientClass = ISupplierService.class,
            relationMethod = "listByIds"
    )
    private String supplierName;

    /**
     * 关联表id
     */
    private String templateRelationId;

    /**
     * 资质编码
     */
    private String qualificationCode;

    /**
     * 资质名称
     */
    private String qualificationName;

    /**
     * 证书编号
     */
    private String qualificationNumber;

    /**
     * 附件id
     */
    private Long fileId;
    @RelationAggregationField(masterIdField = "fileId", relationIdField = "id", relationNameField = "fileName",
            relationClientClass = FileClient.class, relationMethod = "getFileInfos")
    private String fileName;

    private long sqeFileId;

    @RelationAggregationField(masterIdField = "sqeFileId", relationIdField = "id", relationNameField = "fileName",
            relationClientClass = FileClient.class, relationMethod = "getFileInfos")
    private String sqeFileName;

    /**
     * 生效开始日期yyyy-MM-dd
     */
    private String availableStartDate;

    /**
     * 生效结束日期yyyy-MM-dd
     */
    private String availableEndDate;

    /**
     * 状态：1-有效，2-失效，9-历史版本
     */
    private Integer state;

    /**
     * 创建人id
     */
    private Long createUserid;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 修改人id
     */
    private Long updateUserid;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 供应商code
     */
    private String supplierCode;

    /**
     * 供应商类型
     */
    private String supplierType;

    /**
     * 物料编码
     */
    private String materialCode;

    /**
     * 物料组编码
     */
    private String materialGroupCode;

    /**
     * 适用场景，数据字典[qualifications_scene]: 1-注册准入，2-物料认证，3-质量考核
     *
     */
    private Integer scene;
    /**
     * 采购品类
     */
    private String purchaseCategoryCode;

    /**
     * 采购上传标识；0-默认；1-采购上传
     */
    private Integer customUploadFlag;


    /**
     * 邮箱
     */
    private String email;
    /**
     * 剩余天数
     */
    private Integer surplusDay;

    private String version;

    private Long qualificationId;

}
