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

import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
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;

/**
 * 部门表 sysDept
 * 
 * @author 杨晓辉
 */
public class SysDept extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 部门ID */
    private String deptId;

    /** 父部门ID */
    private String deptParentid;

    /** 祖级列表 */
    private String deptLevelcode;

    /** 部门名称 */
    private String deptName;

    /** 显示顺序 */
    private String deptSeq;

    /** 负责人 */
    private String deptManager;

    /** 联系电话 */
    private String deptPhone;

    /** 邮箱 */
    private String deptEmail;

    /** 删除标志（0代表存在 2代表删除） */
    private String deptDelstatus;

    /** 父部门名称 */
    private String parentName;

    /** 部门创建者 */
    @Excel(name = "部门创建者")
    private String deptCreator;

    /** 部门创建时间 */
    @Excel(name = "部门创建时间")
    private String deptCreateddate;

    /** 部门更新者 */
    @Excel(name = "部门更新者")
    private String deptModifier;

    /** 部门更新时间 */
    @Excel(name = "部门更新时间")
    private String deptModifieddate;

    /** 部门备注 */
    @Excel(name = "部门备注")
    private String deptRemark;

    /** 子部门 */
    private List<SysDept> children = new ArrayList<SysDept>();



    public String getDeptId()
    {
        return deptId;
    }

    public void setDeptId(String deptId)
    {
        this.deptId = deptId;
    }

    public String getDeptParentid()
    {
        return deptParentid;
    }

    public void setDeptParentid(String deptParentid)
    {
        this.deptParentid = deptParentid;
    }

    public String getDeptLevelcode()
    {
        return deptLevelcode;
    }

    public void setDeptLevelcode(String deptLevelcode)
    {
        this.deptLevelcode = deptLevelcode;
    }

    @NotBlank(message = "部门名称不能为空")
    @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
    public String getDeptName()
    {
        return deptName;
    }

    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }

    @NotNull(message = "显示顺序不能为空")
    public String getDeptSeq()
    {
        return deptSeq;
    }

    public void setDeptSeq(String deptSeq)
    {
        this.deptSeq = deptSeq;
    }

    public String getDeptManager()
    {
        return deptManager;
    }

    public void setDeptManager(String deptManager)
    {
        this.deptManager = deptManager;
    }

    @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
    public String getDeptPhone()
    {
        return deptPhone;
    }

    public void setDeptPhone(String deptPhone)
    {
        this.deptPhone = deptPhone;
    }

    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    public String getDeptEmail()
    {
        return deptEmail;
    }

    public void setDeptEmail(String deptEmail)
    {
        this.deptEmail = deptEmail;
    }

    public String getDeptDelstatus()
    {
        return deptDelstatus;
    }

    public void setDeptDelstatus(String deptDelstatus)
    {
        this.deptDelstatus = deptDelstatus;
    }

    public String getParentName()
    {
        return parentName;
    }

    public void setParentName(String parentName)
    {
        this.parentName = parentName;
    }

    public List<SysDept> getChildren()
    {
        return children;
    }

    public void setChildren(List<SysDept> children)
    {
        this.children = children;
    }


    public String getDeptCreator()
    {
        return deptCreator;
    }

    public void setDeptCreator(String deptCreator)
    {
        this.deptCreator = deptCreator;
    }

    public String getDeptCreateddate()
    {
        return deptCreateddate;
    }

    public void setDeptCreateddate(String deptCreateddate)
    {
        this.deptCreateddate = deptCreateddate;
    }

    public String getDeptModifier()
    {
        return deptModifier;
    }

    public void setDeptModifier(String deptModifier)
    {
        this.deptModifier = deptModifier;
    }

    public String getDeptModifieddate()
    {
        return deptModifieddate;
    }

    public void setDeptModifieddate(String deptModifieddate)
    {
        this.deptModifieddate = deptModifieddate;
    }

    public String getDeptRemark()
    {
        return deptRemark;
    }

    public void setDeptRemark(String deptRemark)
    {
        this.deptRemark = deptRemark;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("deptId", getDeptId())
            .append("deptParentid", getDeptParentid())
            .append("deptLevelcode", getDeptLevelcode())
            .append("deptName", getDeptName())
            .append("deptSeq", getDeptSeq())
            .append("deptManager", getDeptManager())
            .append("deptPhone", getDeptPhone())
            .append("deptEmail", getDeptEmail())
            .append("deptDelstatus", getDeptDelstatus())
            .append("deptCreator", getDeptCreator())
            .append("deptCreateddate", getDeptCreateddate())
            .append("deptModifier", getDeptModifier())
            .append("deptModifieddate", getDeptModifieddate())
            .toString();
    }
}
