package com.xisc.pm.domain.entity;

import java.io.Serializable;
import java.math.BigDecimal;

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;


/**
 * 策略信息表(PmPolicy)实体类
 *
 * @author 纪文桃 wentao.ji01@hand-china.com
 * @since 2024-10-16 10:43:05
 */

@Getter
@Setter
@ApiModel("策略信息表")
@VersionAudit
@ModifyAudit
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_POLICY")
public class PmPolicy extends AuditDomain implements Serializable {
    private static final long serialVersionUID = -29933231144961044L;

    public static final String FIELD_POLICY_ID = "policyId";
    public static final String FIELD_POLICY_CODE = "policyCode";
    public static final String FIELD_POLICY_DESC = "policyDesc";
    public static final String FIELD_PROD_LINE_ID = "prodLineId";
    public static final String FIELD_A2_WID_DEVIATION = "a2WidDeviation";
    public static final String FIELD_CONSIGN_CUST = "consignCust";
    public static final String FIELD_ST_LOWER_ECONOMIC_LOTS = "stLowerEconomicLots";
    public static final String FIELD_CUST_LOWER_ECONOMIC_LOTS = "custLowerEconomicLots";
  
    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 policyId;

    @ApiModelProperty(value = "策略编码", required = true)
    @NotBlank
    private String policyCode;

    @ApiModelProperty(value = "策略描述", required = true)
    @NotBlank
    private String policyDesc;

    @ApiModelProperty(value = "产线ID", required = true)
    @NotNull
    private Long prodLineId;

    @ApiModelProperty(value = "A2板型宽度偏差", required = true)
    @NotNull
    private BigDecimal a2WidDeviation;

    @ApiModelProperty(value = "收货单位")
    private String consignCust;

    @ApiModelProperty(value = "钢种经济批量下限", required = true)
    @NotNull
    private BigDecimal stLowerEconomicLots;

    @ApiModelProperty(value = "客户经济批量下限", required = true)
    @NotNull
    private BigDecimal custLowerEconomicLots;

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

    private String attribute1;

    private String attribute2;

    private String attribute3;

    private String attribute4;

    private String attribute5;


    @Transient
    @ApiModelProperty(value = "产线编码")
    private String prodLineCode;

    @Transient
    @ApiModelProperty(value = "内部钢种")
    private String stNo;

    @Transient
    @ApiModelProperty(value = "钢种组")
    private String steelGroupCode;

}
