package com.shkj.system.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.shkj.common.annotation.Excel;
import com.shkj.common.annotation.Excel.ColumnType;
import com.shkj.common.core.domain.BaseEntity;

/**
 * 参数配置表 sys_config
 * 
 * @author lch
 */
public class SysParameter extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 参数主键 */
    @Excel(name = "参数主键", cellType = ColumnType.NUMERIC)
    private Long id;

    /** 参数名称 */
    @Excel(name = "参数名称")
    private String paraName;

    /**
     * 仓库ID
     */
    private Long branchId;

    /** 参数键名 */
    @Excel(name = "参数键名")
    private String paraCode;

    /** 参数键值 */
    @Excel(name = "参数键值")
    private String paraValue;

    /** 系统内置（Y是 N否） */
    @Excel(name = "系统内置", readConverterExp = "Y=是,N=否")
    private String paraType;

    public Long getBranchId() {
        return branchId;
    }

    public void setBranchId(Long branchId) {
        this.branchId = branchId;
    }

    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    @NotBlank(message = "参数名称不能为空")
    @Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
    public String getParaName()
    {
        return paraName;
    }

    public void setParaName(String paraName)
    {
        this.paraName = paraName;
    }

    @NotBlank(message = "参数键名长度不能为空")
    @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
    public String getParaCode()
    {
        return paraCode;
    }

    public void setParaCode(String paraCode)
    {
        this.paraCode = paraCode;
    }

    @NotBlank(message = "参数键值不能为空")
    @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
    public String getParaValue()
    {
        return paraValue;
    }

    public void setParaValue(String paraValue)
    {
        this.paraValue = paraValue;
    }

    public String getParaType()
    {
        return paraType;
    }

    public void setParaType(String paraType)
    {
        this.paraType = paraType;
    }
    
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("configId", getId())
            .append("configName", getParaName())
            .append("configKey", getParaCode())
            .append("configValue", getParaValue())
            .append("configType", getParaType())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
