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

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.annotation.JsonFormat;
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.persistence.Transient;

/**
 * @Description : 作业类型
 * @Reference :
 * @Author : amy
 * @CreateDate : 2018-11-07 14:41
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_OP_TYPE")
@Api("作业类型")
public class WmsOpType extends BaseBean {

    private static final long serialVersionUID = -5751852067398288165L;
    @Column(name = "OP_TYPE_CODE")
    @ApiParam("类型编号")
    private String opTypeCode;

    @Column(name = "OP_TYPE_NAME")
    @ApiParam("类型名称")
    private String opTypeName;

    @Column(name = "SEQ")
    @ApiParam(value = "序号", example = "0")
    private Integer seq;

    @Column(name = "ORDER_MIN")
    @ApiParam(value = "单据处理下限", example = "0")
    private Integer orderMin;

    @Column(name = "ORDER_MAX")
    @ApiParam(value = "单据处理上限", example = "0")
    private Integer orderMax;

    @Column(name = "CYCLE_MINS")
    @ApiParam(value = "处理周期(分钟)", example = "0")
    private Integer cycleMins;

    @Column(name = "LAST_TRANS_TIME")
    @ApiParam(value = "末次处理时间")
    private String lastTransTime;

    @Transient
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiParam(value = "末次处理时间", example = "2018-01-01 01:00:00")
    @AnnoOutputColumn(hidden = true)
    public String lastTransTimeStr;

    @Column(name = "IS_SPLIT")
    @ApiParam(value = "是否拆分单据", example = "0")
    private Integer isSplit;

    @Column(name = "SPLIT_RULE")
    @ApiParam(value = "拆分规则")
    private String splitRule;

    @Column(name = "IS_MERGE")
    @ApiParam(value = "是否合并单据", example = "0")
    private Integer isMerge;

    @Column(name = "MERGE_RULE")
    @ApiParam(value = "合并规则")
    private String mergeRule;

    @Column(name = "IS_AUTO_CLOSE")
    @ApiParam(value = "任务未完是否关闭", example = "0")
    private Integer isAutoClose;

    @Column(name = "USE_TIME")
    @ApiParam(value = "标准工时(每箱)", example = "0")
    private Integer useTime;

    @Column(name = "IS_MULITI")
    @ApiParam(value = "是否允许多人操作", example = "0")
    private Integer isMuliti;
}
