提交 | 用户 | 时间
|
e57a89
|
1 |
package com.jcdm.common.core.domain.entity; |
懒 |
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
import java.util.List; |
|
5 |
import javax.validation.constraints.Email; |
|
6 |
import javax.validation.constraints.NotBlank; |
|
7 |
import javax.validation.constraints.NotNull; |
|
8 |
import javax.validation.constraints.Size; |
|
9 |
import org.apache.commons.lang3.builder.ToStringBuilder; |
|
10 |
import org.apache.commons.lang3.builder.ToStringStyle; |
|
11 |
import com.jcdm.common.core.domain.BaseEntity; |
|
12 |
|
|
13 |
/** |
|
14 |
* 部门表 sys_dept |
|
15 |
* |
|
16 |
* @author jc |
|
17 |
*/ |
|
18 |
public class SysDept extends BaseEntity |
|
19 |
{ |
|
20 |
private static final long serialVersionUID = 1L; |
|
21 |
|
|
22 |
/** 部门ID */ |
|
23 |
private Long deptId; |
|
24 |
|
|
25 |
/** 父部门ID */ |
|
26 |
private Long parentId; |
|
27 |
|
|
28 |
/** 祖级列表 */ |
|
29 |
private String ancestors; |
|
30 |
|
|
31 |
/** 部门名称 */ |
|
32 |
private String deptName; |
|
33 |
|
|
34 |
/** 显示顺序 */ |
|
35 |
private Integer orderNum; |
|
36 |
|
|
37 |
/** 负责人 */ |
|
38 |
private String leader; |
|
39 |
|
|
40 |
/** 联系电话 */ |
|
41 |
private String phone; |
|
42 |
|
|
43 |
/** 邮箱 */ |
|
44 |
private String email; |
|
45 |
|
|
46 |
/** 部门状态:0正常,1停用 */ |
|
47 |
private String status; |
|
48 |
|
|
49 |
/** 删除标志(0代表存在 2代表删除) */ |
|
50 |
private String delFlag; |
|
51 |
|
|
52 |
/** 父部门名称 */ |
|
53 |
private String parentName; |
|
54 |
|
|
55 |
/** 子部门 */ |
|
56 |
private List<SysDept> children = new ArrayList<SysDept>(); |
|
57 |
|
|
58 |
public Long getDeptId() |
|
59 |
{ |
|
60 |
return deptId; |
|
61 |
} |
|
62 |
|
|
63 |
public void setDeptId(Long deptId) |
|
64 |
{ |
|
65 |
this.deptId = deptId; |
|
66 |
} |
|
67 |
|
|
68 |
public Long getParentId() |
|
69 |
{ |
|
70 |
return parentId; |
|
71 |
} |
|
72 |
|
|
73 |
public void setParentId(Long parentId) |
|
74 |
{ |
|
75 |
this.parentId = parentId; |
|
76 |
} |
|
77 |
|
|
78 |
public String getAncestors() |
|
79 |
{ |
|
80 |
return ancestors; |
|
81 |
} |
|
82 |
|
|
83 |
public void setAncestors(String ancestors) |
|
84 |
{ |
|
85 |
this.ancestors = ancestors; |
|
86 |
} |
|
87 |
|
|
88 |
@NotBlank(message = "部门名称不能为空") |
|
89 |
@Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符") |
|
90 |
public String getDeptName() |
|
91 |
{ |
|
92 |
return deptName; |
|
93 |
} |
|
94 |
|
|
95 |
public void setDeptName(String deptName) |
|
96 |
{ |
|
97 |
this.deptName = deptName; |
|
98 |
} |
|
99 |
|
|
100 |
@NotNull(message = "显示顺序不能为空") |
|
101 |
public Integer getOrderNum() |
|
102 |
{ |
|
103 |
return orderNum; |
|
104 |
} |
|
105 |
|
|
106 |
public void setOrderNum(Integer orderNum) |
|
107 |
{ |
|
108 |
this.orderNum = orderNum; |
|
109 |
} |
|
110 |
|
|
111 |
public String getLeader() |
|
112 |
{ |
|
113 |
return leader; |
|
114 |
} |
|
115 |
|
|
116 |
public void setLeader(String leader) |
|
117 |
{ |
|
118 |
this.leader = leader; |
|
119 |
} |
|
120 |
|
|
121 |
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符") |
|
122 |
public String getPhone() |
|
123 |
{ |
|
124 |
return phone; |
|
125 |
} |
|
126 |
|
|
127 |
public void setPhone(String phone) |
|
128 |
{ |
|
129 |
this.phone = phone; |
|
130 |
} |
|
131 |
|
|
132 |
@Email(message = "邮箱格式不正确") |
|
133 |
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") |
|
134 |
public String getEmail() |
|
135 |
{ |
|
136 |
return email; |
|
137 |
} |
|
138 |
|
|
139 |
public void setEmail(String email) |
|
140 |
{ |
|
141 |
this.email = email; |
|
142 |
} |
|
143 |
|
|
144 |
public String getStatus() |
|
145 |
{ |
|
146 |
return status; |
|
147 |
} |
|
148 |
|
|
149 |
public void setStatus(String status) |
|
150 |
{ |
|
151 |
this.status = status; |
|
152 |
} |
|
153 |
|
|
154 |
public String getDelFlag() |
|
155 |
{ |
|
156 |
return delFlag; |
|
157 |
} |
|
158 |
|
|
159 |
public void setDelFlag(String delFlag) |
|
160 |
{ |
|
161 |
this.delFlag = delFlag; |
|
162 |
} |
|
163 |
|
|
164 |
public String getParentName() |
|
165 |
{ |
|
166 |
return parentName; |
|
167 |
} |
|
168 |
|
|
169 |
public void setParentName(String parentName) |
|
170 |
{ |
|
171 |
this.parentName = parentName; |
|
172 |
} |
|
173 |
|
|
174 |
public List<SysDept> getChildren() |
|
175 |
{ |
|
176 |
return children; |
|
177 |
} |
|
178 |
|
|
179 |
public void setChildren(List<SysDept> children) |
|
180 |
{ |
|
181 |
this.children = children; |
|
182 |
} |
|
183 |
|
|
184 |
@Override |
|
185 |
public String toString() { |
|
186 |
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|
187 |
.append("deptId", getDeptId()) |
|
188 |
.append("parentId", getParentId()) |
|
189 |
.append("ancestors", getAncestors()) |
|
190 |
.append("deptName", getDeptName()) |
|
191 |
.append("orderNum", getOrderNum()) |
|
192 |
.append("leader", getLeader()) |
|
193 |
.append("phone", getPhone()) |
|
194 |
.append("email", getEmail()) |
|
195 |
.append("status", getStatus()) |
|
196 |
.append("delFlag", getDelFlag()) |
|
197 |
.append("createBy", getCreateBy()) |
|
198 |
.append("createTime", getCreateTime()) |
|
199 |
.append("updateBy", getUpdateBy()) |
|
200 |
.append("updateTime", getUpdateTime()) |
|
201 |
.toString(); |
|
202 |
} |
|
203 |
} |