package cn.estsh.i3plus.pojo.aps.bean;

import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.Min;

/**
 * @Description :炉资源容量限制
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2019-10-22
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="APS_FURNACE_CAPACITY")
@Api("炉容量")
public class FurnaceCapacity extends BaseAPS {

    private static final long serialVersionUID = -5657804042629460659L;
    @Column(name="RES_CODES")
    @ApiParam(value ="资源编码")
    @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
    private String resCodes;

    @Column(name="STAND_CODE")
    @ApiParam(value ="标准工序编码")
    @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "StandOperation")
    private String standCode;

    @Column(name="MATERIAL_CODE")
    @ApiParam(value ="物料编码")
    @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Material")
    private String materialCode;

    @Column(name="CAPACITY", columnDefinition = "decimal(18,8)")
    @ApiParam(value ="容量限制")
    @Min(0)
    private Double capacity;
}
