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 javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Description :动态设置时间与物料相关的配置
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2019-09-22
 * @Modify:
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_MATERIAL_SET_TIME")
@Api("物料设置时间")
public class MaterialSetTime extends BaseAPS {
    private static final long serialVersionUID = -7996431489447641539L;
    @Column(name="RES_CODE")
    @ApiParam(value ="资源编码")
    @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
    private String resCode;

    @Column(name="PREV_MATERIAL")
    @ApiParam(value ="前物料")
    @FieldAnnotation(notEmpty = true)
    private String prevMaterial;

    @Column(name="POST_MATERIAL")
    @ApiParam(value ="后物料")
    @FieldAnnotation(notEmpty = true)
    private String postMaterial;

    @Column(name="TIME")
    @ApiParam(value ="设置时间")
    @FieldAnnotation(notEmpty = true)
    private String time;

    @Column(name="PRIORITY")
    @ApiParam(value ="优先级")
    @FieldAnnotation(defaultValue = "10")
    private int priority;
}
