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

import cn.estsh.i3plus.pojo.base.annotation.DynamicField;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
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.Lob;
import javax.persistence.Table;

/**
 * @Description : 仓库健康度变量
 * @Reference :
 * @Author : siliter.yuan
 * @CreateDate : 2020-05-13 13:54
 * @Modify:
 **/
@Data
@Entity
@Table(name="WMS_HEALTH_VARIABLE")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value="仓库健康度变量",description = "仓库健康度变量")
public class WmsHealthVariable extends BaseBean {

    private static final long serialVersionUID = 7332606449041273554L;

    @Column(name = "VARIABLE_CODE")
    @ApiParam(value = "变量代码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String variableCode;

    @Column(name = "VARIABLE_NAME")
    @ApiParam(value = "变量名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String variableName;

    @Column(name = "CYCLE_RANGE")
    @ApiParam(value = "周期(天)")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER)
    private Integer cycleRange;

    @Column(name = "CALC_FREQUENCY")
    @ApiParam(value = "计算频次(天)")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER)
    private Integer calcFrequency;

    @Column(name = "LAST_CALC_TIME")
    @ApiParam(value = "末次计算时间")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String lastCalcTime;

    @Column(name = "NEXT_CALC_TIME")
    @ApiParam(value = "下次计算时间")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String nextCalcTime;

    @Column(name = "APPLY_AREA")
    @ApiParam(value = "适应存储区")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String applyArea;

    @Column(name = "APPLY_PART_GROUP")
    @ApiParam(value = "适应物料组")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String applyPartGroup;

    @Lob
    @Column(name = "VARIABLE_PARAM")
    @ApiParam(value = "变量参数")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String variableParam;

    @Lob
    @Column(name = "SQL_STATEMENT")
    @ApiParam(value = "SQL语句")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String sqlStatement;

    @Column(name = "CLASS_PATH")
    @ApiParam(value = "调用类名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String className;

    @Column(name = "FUNCTION_NAME")
    @ApiParam(value = "方法名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String functionName;

    @Column(name = "SCRIPT_NO")
    @ApiParam(value = "脚本编号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String scriptNo;

    @Column(name = "CALC_WAYS")
    @ApiParam(value = "测算方式")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String calcWays;
}
