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;

/**
 * 策略组表(PmPolicyGroup)实体类
 *
 * @author 纪文桃 wentao.ji01@hand-china.com
 * @since 2024-11-08 09:38:29
 */

@Getter
@Setter
@ApiModel("策略组表")
@VersionAudit
@ModifyAudit
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_POLICY_GROUP")
public class PmPolicyGroup extends AuditDomain {
    private static final long serialVersionUID = -32805579949154910L;

    public static final String FIELD_POLICY_GROUP_ID = "policyGroupId";
    public static final String FIELD_POLICY_GROUP_CODE = "policyGroupCode";
    public static final String FIELD_POLICY_GROUP_DESC = "policyGroupDesc";
    public static final String FIELD_DELIVY_DATE_FROM = "delivyDateFrom";
    public static final String FIELD_DELIVY_DATE_TO = "delivyDateTo";
    public static final String FIELD_OVERCAST_QTY = "overcastQty";
    public static final String FIELD_OVERCAST_DELIVY_DATE_TO = "overcastDelivyDateTo";
    public static final String FIELD_DESIGN_LENGTH_MAX = "designLengthMax";
    public static final String FIELD_BETTER_TO_WORSE_FLAG = "betterToWorseFlag";
    public static final String FIELD_YIELD_LOWER = "yieldLower";
    public static final String FIELD_INVERTED_FLAG = "invertedFlag";
    public static final String FIELD_CONTRACT_NUMS = "contractNums";
    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 policyGroupId;

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

    @ApiModelProperty(value = "策略组描述")
    private String policyGroupDesc;

    @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 = "合约号，多条记录按逗号分割")
    private String contractNums ;

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


}

