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_ASSIST_RESOURCE_SET_TIME")
@Api("副资源设置时间")
public class AssistResourceSetTime extends BaseAPS {
    private static final long serialVersionUID = 901172392855536686L;
    @Column(name="RES_CODE")
    @ApiParam(value ="资源编码")
    @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
    private String resCode;

    @Column(name="TYPE")
    @ApiParam(value ="副资源使用类型")
    @FieldAnnotation(defaultValue = "FIRST_ASS")
    private ApsEnumUtil.USE_TYPE type;

    @Column(name="PREV_RESOURCE")
    @ApiParam(value ="前资源")
    @FieldAnnotation(notEmpty = true)
    private String prevResource;

    @Column(name="POST_RESOURCE")
    @ApiParam(value ="后资源")
    @FieldAnnotation(notEmpty = true)
    private String postResource;

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

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