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;


/**
 * 合同范围表(PmRuntimeContract)实体类
 *
 * @author 纪文桃 wentao.ji01@hand-china.com
 * @since 2024-10-12 16:52:25
 */

@Getter
@Setter
@ApiModel("合同范围表")
@VersionAudit
@ModifyAudit
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_RUNTIME_CONTRACT")
public class PmRuntimeContract extends AuditDomain implements Serializable {
    private static final long serialVersionUID = -37280009333999562L;

    public static final String FIELD_CONTRACT_ID = "contractId";
    public static final String FIELD_ORDER_NO = "orderNo";
    public static final String FIELD_REQUEST_ID = "requestId";
    public static final String FIELD_REMAINING_FLAG = "remainingFlag";
    public static final String FIELD_ST_NO = "stNo";
    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 contractId;

    @ApiModelProperty(value = "合同号", required = true)
    @NotBlank
    private String orderNo;

    @ApiModelProperty(value = "请求ID", required = true)
    @NotBlank
    private Long requestId;

    @ApiModelProperty(value = "尾量标记", required = true)
    @NotNull
    private Long remainingFlag;
    
    @ApiModelProperty(value = "钢种", required = true)
    @NotNull
    private String stNo ;

    @ApiModelProperty(value = "租户ID", required = true)
    @NotNull
    private Long tenantId;
    
    @ApiModelProperty(value = "总数量", required = true)
    private BigDecimal qty ;
    
    @Transient
    private BigDecimal orderWt ;

}
