package com.xisc.pm.domain.entity;

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

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 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;

/**
 * 请求信息表
 *
 * @author jun.zeng 2024-11-25 14:51:07
 */
@Setter
@Getter
@ApiModel("请求信息表")
@VersionAudit
@ModifyAudit
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_REQUEST_INFO")
public class PmRequestInfo extends AuditDomain {

    public static final String FIELD_REQUEST_ID = "requestId";
    public static final String FIELD_REQUEST_CODE = "requestCode";
    public static final String FIELD_POLICY_GROUP_ID = "policyGroupId";
    public static final String FIELD_REQUEST_STTUS = "requestStatus";
    public static final String FIELD_REQUEST_TYPE = "requestType";
    public static final String FIELD_DELIVY_DTE_FROM = "delivyDateFrom";
    public static final String FIELD_DELIVY_DTE_TO = "delivyDateTo";
    public static final String FIELD_OVERCST_QTY = "overcastQty";
    public static final String FIELD_OVERCST_DELIVY_DTE_TO = "overcastDelivyDateTo";
    public static final String FIELD_DESIGN_LENGTH_MX = "designLengthMax";
    public static final String FIELD_BETTER_TO_WORSE_FLG = "betterToWorseFlag";
    public static final String FIELD_YIELD_LOWER = "yieldLower";
    public static final String FIELD_INVERTED_FLG = "invertedFlag";
    public static final String FIELD_PRIORITY_DELIVY_DTE_TO = "priorityDelivyDateTo";
    public static final String FIELD_PRIORITY_CONTRCT_LLOWNCE = "priorityContractAllowance";
    public static final String FIELD_CLER_DELIVY_DTE_TO = "clearDelivyDateTo";
    public static final String FIELD_CLER_CONTRCT_LLOWNCE = "clearContractAllowance";
    public static final String FIELD_CLER_SINGLE_YIELD = "clearSingleYield";
    public static final String FIELD_CLER_2_WID_DEVITION = "clearA2WidDeviation";
    public static final String FIELD_CLER_OVERCST_QTY = "clearOvercastQty";
    public static final String FIELD_CLER_OVERCST_DELIVY_DTE_TO = "clearOvercastDelivyDateTo";
    public static final String FIELD_CLER_DESIGN_LENGTH_MX = "clearDesignLengthMax";
    public static final String FIELD_TENNT_ID = "tenantId";
    public static final String FIELD_OBJECT_VERSION_NUMBER = "objectVersionNumber";
    public static final String FIELD_CRETION_DTE = "creationDate";
    public static final String FIELD_CRETED_BY = "createdBy";
    public static final String FIELD_LST_UPDTED_BY = "lastUpdatedBy";
    public static final String FIELD_LST_UPDTE_DTE = "lastUpdateDate";
    public static final String FIELD_TTRIBUTE1 = "attribute1";
    public static final String FIELD_TTRIBUTE2 = "attribute2";
    public static final String FIELD_TTRIBUTE3 = "attribute3";
    public static final String FIELD_TTRIBUTE4 = "attribute4";
    public static final String FIELD_TTRIBUTE5 = "attribute5";
    public static final String FIELD_EXEC_START_DATE = "execStartDate";
    public static final String FIELD_EXEC_END_DATE = "execEndDate";
    public static final String FIELD_TOT_SMALL_PLATE_NUM = "totSmallPlateNum";

    @ApiModelProperty("请求ID")
    @Id
    @GeneratedValue
    private Long requestId;
    @ApiModelProperty(value = "请求编码", required = true)
    @NotBlank
    private String requestCode;
    @ApiModelProperty(value = "策略组ID")
    private Long policyGroupId;
    @ApiModelProperty(value = "请求状态", required = true)
    @NotBlank
    private String requestStatus;
    @ApiModelProperty(value = "请求类型", required = true)
    @NotBlank
    private String requestType;
    @ApiModelProperty(value = "交货期起")
    private Date delivyDateFrom;
    @ApiModelProperty(value = "交货期止")
    private Date delivyDateTo;
    @ApiModelProperty(value = "允许超投件数")
    private BigDecimal overcastQty;
    @ApiModelProperty(value = "允许超投交货期止")
    private Date overcastDelivyDateTo;
    @ApiModelProperty(value = "指定长上限")
    private BigDecimal designLengthMax;
    @ApiModelProperty(value = "是否以优充次")
    private Long betterToWorseFlag;
    @ApiModelProperty(value = "收得率下限", required = true)
    @NotNull
    private BigDecimal yieldLower;
    @ApiModelProperty(value = "是否倒置")
    private Long invertedFlag;
    @ApiModelProperty(value = "尾量优先-交货期止", required = true)
    @NotBlank
    private Date priorityDelivyDateTo;
    @ApiModelProperty(value = "尾量优先-合约欠量", required = true)
    @NotNull
    private BigDecimal priorityContractAllowance;
    @ApiModelProperty(value = "尾量清零-交货期止")
    private Date clearDelivyDateTo;
    @ApiModelProperty(value = "尾量清零-合约欠量")
    private BigDecimal clearContractAllowance;
    @ApiModelProperty(value = "尾量清零-单板收得率")
    private BigDecimal clearSingleYield;
    @ApiModelProperty(value = "尾量清零-A2板型宽度偏差")
    private BigDecimal clearA2WidDeviation;
    @ApiModelProperty(value = "尾量清零-允许超投件数")
    private BigDecimal clearOvercastQty;
    @ApiModelProperty(value = "尾量清零-允许超投交货期止")
    private Date clearOvercastDelivyDateTo;
    @ApiModelProperty(value = "尾量清零-指定长上限")
    private BigDecimal clearDesignLengthMax;
    
    @ApiModelProperty(value = "发布的版本")
    private Long publishedVersion ;
    
    @ApiModelProperty(value = "租户ID", required = true)
    @NotNull
    private Long tenantId;
    @ApiModelProperty(value = "行版本号，用来处理锁", required = true)
    @NotNull
    private Long objectVersionNumber;
    
    private Date execStartDate ;
    private Date execEndDate ;
    private BigDecimal totSmallPlateNum ;
    
    private String contractNums ;
    
    @Transient
    private String updateByName;
    @Transient
    private String createByName;
}