package com.xisc.pm.domain.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * 转用充当履历(PmCdContLog)实体类
 *
 * @author 蒋雨航 yuhang.jiang02@hand-china.com
 * @since 2024-08-16 16:43:01
 */

@Getter
@Setter
@ApiModel("转用充当履历")
@VersionAudit
@ModifyAudit
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_CD_CONT_LOG")
public class PmCdContLog extends AuditDomain implements Serializable {
    private static final long serialVersionUID = 158935216480843858L;

    public static final String FIELD_LOAD_CONT_LOG_ID = "loadContLogId";
    public static final String FIELD_EVENT_ID = "eventId";
    public static final String FIELD_SYSTEM_ID = "systemId";
    public static final String FIELD_FUNC_ID = "funcId";
    public static final String FIELD_MAT_KIND = "matKind";
    public static final String FIELD_MAT_NO = "matNo";
    public static final String FIELD_ORIGIN_MAT_NO = "originMatNo";
    public static final String FIELD_ORDER_NO = "orderNo";
    public static final String FIELD_MAT_STATUS = "matStatus";
    public static final String FIELD_WHOLE_BACKLOG = "wholeBacklog";
    public static final String FIELD_MSC = "msc";
    public static final String FIELD_MSC_LINE_NO = "mscLineNo";
    public static final String FIELD_PSC = "psc";
    public static final String FIELD_APN = "apn";
    public static final String FIELD_SG_STD = "sgStd";
    public static final String FIELD_SG_SIGN = "sgSign";
    public static final String FIELD_COMPLEX_DECIDE_CODE = "complexDecideCode";
    public static final String FIELD_WT = "wt";
    public static final String FIELD_NUM = "num";
    public static final String FIELD_OLD_ORDER_NO = "oldOrderNo";
    public static final String FIELD_OLD_MAT_ACT_WT = "oldMatActWt";
    public static final String FIELD_TENANT_ID = "tenantId";
    public static final String FIELD_ATTRIBUTE1 = "attribute1";
    public static final String FIELD_ATTRIBUTE2 = "attribute2";
    public static final String FIELD_ATTRIBUTE3 = "attribute3";
    public static final String FIELD_ATTRIBUTE4 = "attribute4";
    public static final String FIELD_ATTRIBUTE5 = "attribute5";

    @ApiModelProperty("表ID，主键")
    @Id
    @GeneratedValue
    private Long loadContLogId;

    @ApiModelProperty(value = "事件标识")
    private String eventId;

    @ApiModelProperty(value = "系统标识")
    private String systemId;

    @ApiModelProperty(value = "功能标识")
    private String funcId;

    @ApiModelProperty(value = "物料种类")
    private String matKind;

    @ApiModelProperty(value = "材料号", required = true)
    @NotBlank
    private String matNo;

    @ApiModelProperty(value = "外购材料号")
    private String originMatNo;

    @ApiModelProperty(value = "合同号")
    private String orderNo;

    @ApiModelProperty(value = "材料状态码")
    private String matStatus;

    @ApiModelProperty(value = "全程工序途径码")
    private String wholeBacklog;

    @ApiModelProperty(value = "冶金规范码")
    private String msc;

    @ApiModelProperty(value = "产线号", required = true)
    private String mscLineNo;

    @ApiModelProperty(value = "产品规范码")
    private String psc;

    @ApiModelProperty(value = "产品最终用途码")
    private String apn;

    @ApiModelProperty(value = "执行标准")
    private String sgStd;

    @ApiModelProperty(value = "标准牌号")
    private String sgSign;

    @ApiModelProperty(value = "综合判定代码")
    private String complexDecideCode;

    @ApiModelProperty(value = "重量")
    private BigDecimal wt;

    @ApiModelProperty(value = "件数")
    private Long num;

    @ApiModelProperty(value = "原合同号")
    private String oldOrderNo;

    @ApiModelProperty(value = "前重量")
    private Long oldMatActWt;

    @ApiModelProperty(value = "租户ID", required = true)
    @NotNull
    private Long tenantId;

    private String attribute1;

    private String attribute2;

    private String attribute3;

    private String attribute4;

    private String attribute5;

    @ApiModelProperty(value = "合同性质")
    @Transient
    private String orderTypeCode;

    @ApiModelProperty(value = "日期范围[起]")
    @Transient
    private Date dateRangeFrom;

    @ApiModelProperty(value = "日期范围[止]")
    @Transient
    private Date dateRangeTo;

    @ApiModelProperty(value = "事件跟踪序列号[起]")
    @Transient
    private String trackSeqNoFrom;

    @ApiModelProperty(value = "事件跟踪序列号[止]")
    @Transient
    private String trackSeqNoTo;

    @Transient
    private List<String> funcIdList;

    @Transient
    @ApiModelProperty(value = "创建人")
    private String createdByName;
}
