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.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
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 : jessica.chen
 * @CreateDate : 2018-11-23 14:52
 * @Modify:
 **/
@Data
@Entity
@Table(name = "WMS_ACTION_STEP_CALL_PARAM")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value = "作业步骤调用参数表", description = "作业步骤调用参数表")
public class WmsActionStepCallParam extends BaseBean {

    private static final long serialVersionUID = -2813779192436803301L;
    @Column(name = "AGD_ID", nullable = false)
    @ApiParam(value = "流程明细编号")
    @JsonSerialize(using = ToStringSerializer.class)
    @AnnoOutputColumn
    private Long agdId;

    @Column(name = "SEQ",nullable = false)
    @ApiParam(value = "序号")
    @AnnoOutputColumn
    private Integer seq;

    @Column(name = "AM_ID", nullable = false)
    @ApiParam(value = "处理组件编号")
    @JsonSerialize(using = ToStringSerializer.class)
    @AnnoOutputColumn
    private Long amId;

    @Column(name = "PARAM_CODE",nullable = false)
    @ApiParam(value = "参数编码")
    @AnnoOutputColumn
    private String paramCode;

    @Column(name = "PARAM_VALUE", columnDefinition = "varchar(225) default ''")
    @ApiParam(value = "参数值")
    private String paramValue;

    @Transient
    @ApiParam(value = "组件名称")
    private String amName;

    @Transient
    @ApiParam(value = "流程ID")
    private Long agId;

    public WmsActionStepCallParam() {
    }

    public WmsActionStepCallParam(Long id, Long agId) {
        this.id = id;
        this.agId = agId;
    }
}
