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

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
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 : wms系统参数配置
 * @Reference :
 * @Author : siliter
 * @CreateDate : 2019-03-07 09:58
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="WMS_CONFIG")
@Api(value="系统配置",description = "WMS系统配置")
public class WmsConfig extends BaseBean {

    private static final long serialVersionUID = 8998024716940590623L;
    @Column(name="NAME")
    @ApiParam(value ="名称")
    private String name;

    @Column(name="CONFIG_TYPE")
    @ApiParam(value ="参数类型ID（枚举：1.系统配置...）" , example ="-1")
    private Integer configType;

    @Column(name="CONFIG_CODE")
    @ApiParam(value ="参数代码")
    private String configCode;

    // 枚举 ImppEnumUtil.SYS_CONFIG_GROUP
    @Column(name="CONFIG_GROUP")
    @ApiParam(value ="参数组")
    private Integer configGroup;

    // 枚举 ImppEnumUtil.SYS_VALUE_TYPE
    @Column(name="CONFIG_VALUE_TYPE")
    @ApiParam(value ="参数值类型")
    private String configValueType;

    /**
     * SQL Server 2005:请使用 varchar(max)、nvarchar(max) 和 varbinary(max) 数据类型，而不要使用 text、ntext 和 image 数据类型。
     */
    @Lob
    @Column(name="CONFIG_VALUE", columnDefinition = "TEXT")
    @ApiParam(value ="参数值")
    private String configValue;

    @Column(name="CONFIG_DESCRIPTION")
    @ApiParam(value ="参数描述")
    private String configDescription;

}
