package com.yunfeiyun.agmp.common.core.domain.entity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import com.yunfeiyun.agmp.common.core.domain.BaseEntity;
import com.yunfeiyun.agmp.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 字典类型表 SysDicttype
 * 
 * @author 杨晓辉
 */
public class SysDictType extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 字典主键 */
    @Excel(name = "字典类型主键")
    private String dicttypeId;

    /** 字典名称 */
    @Excel(name = "字典名称")
    private String dicttypeName;

    /** 字典类型编码 */
    @Excel(name = "字典类型编码")
    private String dicttypeCode;

    /** 字典类型创建者 */
    @Excel(name = "字典类型创建者")
    private String dicttypeCreator;

    /** 字典类型创建时间 */
    @Excel(name = "字典类型创建时间")
    private String dicttypeCreateddate;

    /** 字典类型更新者 */
    @Excel(name = "字典类型更新者")
    private String dicttypeModifier;

    /** 字典类型更新时间 */
    @Excel(name = "字典类型更新时间")
    private String dicttypeModifieddate;

    /** 字典类型备注 */
    @Excel(name = "字典类型备注")
    private String dicttypeRemark;


    public SysDictType()
    {
        setDicttypeId(getId());
    }

    public String getDicttypeId()
    {
        return dicttypeId;
    }

    public void setDicttypeId(String dicttypeId)
    {
        this.dicttypeId = dicttypeId;
    }

    @NotBlank(message = "字典名称不能为空")
    @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
    public String getDicttypeName()
    {
        return dicttypeName;
    }

    public void setDicttypeName(String dicttypeName)
    {
        this.dicttypeName = dicttypeName;
    }

    @NotBlank(message = "字典类型不能为空")
    @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
    @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头，且只能为（小写字母，数字，下滑线）")
    public String getDicttypeCode()
    {
        return dicttypeCode;
    }

    public void setDicttypeCode(String dicttypeCode)
    {
        this.dicttypeCode = dicttypeCode;
    }


    public String getDicttypeCreator()
    {
        return dicttypeCreator;
    }

    public void setDicttypeCreator(String dicttypeCreator)
    {
        this.dicttypeCreator = dicttypeCreator;
    }

    public String getDicttypeCreateddate()
    {
        return dicttypeCreateddate;
    }

    public void setDicttypeCreateddate(String dicttypeCreateddate)
    {
        this.dicttypeCreateddate = dicttypeCreateddate;
    }

    public String getDicttypeModifier()
    {
        return dicttypeModifier;
    }

    public void setDicttypeModifier(String dicttypeModifier)
    {
        this.dicttypeModifier = dicttypeModifier;
    }

    public String getDicttypeModifieddate()
    {
        return dicttypeModifieddate;
    }

    public void setDicttypeModifieddate(String dicttypeModifieddate)
    {
        this.dicttypeModifieddate = dicttypeModifieddate;
    }

    public String getDicttypeRemark()
    {
        return dicttypeRemark;
    }

    public void setDicttypeRemark(String dicttypeRemark)
    {
        this.dicttypeRemark = dicttypeRemark;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("dicttypeId", getDicttypeId())
            .append("dicttypeName", getDicttypeName())
            .append("dicttypeCode", getDicttypeCode())
            .append("dicttypeCreator", getDicttypeCreator())
            .append("dicttypeCreateddate", getDicttypeCreateddate())
            .append("dicttypeModifier", getDicttypeModifier())
            .append("dicttypeModifieddate", getDicttypeModifieddate())
            .append("dicttypeRemark", getDicttypeRemark())
            .toString();
    }
}
