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

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

/**
 * 自动替代履历表(PmSubHis)实体类
 *
 * @author BKGY
 * @since 2024-12-26 09:57:35
 */

@ApiModel("自动替代履历表")
@VersionAudit
@ModifyAudit
@Data
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_SUB_HIS")
public class PmSubHis extends AuditDomain implements Serializable {
    private static final long serialVersionUID = -19866159813813876L;

    public static final String FIELD_ID = "id";
    public static final String FIELD_SLAB_NO = "slabNo";
    public static final String FIELD_SUB_YIELD = "subYield";
    public static final String FIELD_REL_YIELD = "relYield";
    public static final String FIELD_SUB_RESULT = "subResult";
    public static final String FIELD_SUB_INFO = "subInfo";
    public static final String FIELD_PROCESS_CODE = "processCode";
    public static final String FIELD_FORM_PLATE_MODE = "formPlateMode";
    public static final String FIELD_ST_NO = "stNo";
    public static final String FIELD_SLAB_THICK = "slabThick";
    public static final String FIELD_SLAB_WID = "slabWid";
    public static final String FIELD_SLAB_LEN = "slabLen";
    public static final String FIELD_SLAB_WT = "slabWt";
    public static final String FIELD_SUB_TIME = "subTime";
    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 id;

    @ApiModelProperty(value = "板坯号", required = true)
    @NotBlank
    private String slabNo;

    @ApiModelProperty(value = "替代率", required = true)
    @NotNull
    private BigDecimal subYield;

    @ApiModelProperty(value = "利用率", required = true)
    @NotNull
    private BigDecimal relYield;

    @ApiModelProperty(value = "处理结果", required = true)
    @NotBlank
    private String subResult;

    @ApiModelProperty(value = "处理内容")
    private String subInfo;

    @ApiModelProperty(value = "进程代码")
    private String processCode;

    @ApiModelProperty(value = "组板方式")
    private String formPlateMode;

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

    @ApiModelProperty(value = "厚度")
    private BigDecimal slabThick;

    @ApiModelProperty(value = "宽度")
    private BigDecimal slabWid;

    @ApiModelProperty(value = "长度")
    private BigDecimal slabLen;

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

    @ApiModelProperty(value = "替代时间", required = true)
    @NotNull
    private Date subTime;

    @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 = "虚拟板坯号")
    private String virtualSlabNo;

    @ApiModelProperty(value = "轧件厚")
    private BigDecimal rollThk;

    @ApiModelProperty(value = "轧件宽")
    private BigDecimal rollWid;

    @ApiModelProperty(value = "轧件长")
    private BigDecimal rollLen;

    @ApiModelProperty(value = "头部切舍量")
    private BigDecimal headCut;

    @ApiModelProperty(value = "尾部切舍量")
    private BigDecimal tailCut;

    @ApiModelProperty(value = "切边宽度")
    private BigDecimal widCut;

    @ApiModelProperty(value = "切缝长度")
    private BigDecimal slitLen;

    @ApiModelProperty(value = "必要板坯长度")
    private BigDecimal needSlabLen;

    @ApiModelProperty(value = "必要板坯重量")
    private BigDecimal needSlabWt;

    @ApiModelProperty(value = "必要板坯重量")
    private String relKey;
}

