派生自 projectDept/qhighschool

EricsHu
2022-12-05 068fc7f2e81178e55fa191a13709af64b1a163f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
package com.qxueyou.scc.org.model;
 
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
 
//import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
//import javax.persistence.JoinColumn;
//import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
 
import org.springframework.format.annotation.DateTimeFormat;
 
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonManagedReference;
 
 
/**
 * The persistent class for the organization database table.
 * 
 */
@Entity
@Table(name="organization")
@NamedQuery(name="Organization.findAll", query="SELECT o FROM Organization o")
public class Organization implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /** 用户类型(1,职业培训;2,学历教育;3,企业内训;4,活动沙龙;5,代理机构) */
    public static final short ORG_TYPE_JOB_TRAINING = 1;
    
    public static final short ORG_TYPE_DEGREE_EDUCATION = 2;
    
    public static final short ORG_TYPE_ORG_CORPORATE_TRAINING = 3;
    
    public static final short ORG_TYPE_ACTIVITY_SALON = 4;
    
    public static final short ORG_TYPE_CLASS_AGENCY = 5;
    /**  level (1:学校  2:系  3:学院)  */
    public static final short ORG_LEVEL_SCHOOL = 1;
    public static final short ORG_LEVEL_SYSTEM = 2;
    public static final short ORG_LEVEL_COURTYARD = 3;
 
    @Id
    @Column(name="ORGANIZATION_ID", unique=true, nullable=false, length=32)
    private String organizationId;
    
    @Column(name="PARENT_ORGANIZATION_ID", length=32)
    private String parentOrganizationId;
    
    @Column(name="ORG_CODE", length=64)
    private String orgCode;
    
    @Column(name="CREATE_ID", nullable=false, length=32)
    @JsonIgnore
    private String createId;
 
    @Column(name="CREATE_TIME", nullable=false)
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonIgnore
    private Date createTime;
 
    @Column(name="CREATOR", nullable=false, length=100)
    @JsonIgnore
    private String creator;
    
    @Column(name="TEL", length=32)
    private String tel;
    
    @Column(name="LOGO_PATH", length=255)
    private String logoPath;
 
    @Column(name="DELETE_FLAG", nullable=false)
    @JsonIgnore
    private String deleteFlag;
    
    @Column(name="UPDATE_ID", length=32)
    @JsonIgnore
    private String updateId;
 
    @Column(name="UPDATE_TIME", nullable=false)
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonIgnore
    private Date updateTime;
 
    @Column(name="UPDATOR", length=100)
    @JsonIgnore
    private String updator;
    
    
    @Column(name="CODE",length=32)
    private String code;
 
    @Column(name="SHORT_NAME", length=150)
    private String shortName;
    
    @Column(name="NAME", length=150)
    private String name;
    
    @Column(name="SERVER_URL", length=150)
    private String serverUrl;
    
    /**  类型:(1.职业培训 2.学历教育3.企业内训 4.活动沙龙5.代理机构)  */
    @Column(name="TYPE", length=6)
    private String type;
    
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "org")
    @JsonManagedReference
    private List<OrgCollegeCourse> courses;
    
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "topOrg")
    @JsonManagedReference
    private List<OrgCollegeCourse> topCourses;
    
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "organization")
    @JsonIgnore
    private List<OrgAdmin> admins;
    
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "organization")
    @JsonIgnore
    private List<OrgCharger> chargers;
    
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "organization")
    @JsonIgnore
    private List<OrgSalesman> salesmans;
    
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "organization")
    @JsonIgnore
    private List<OrgTeacher> teachers;
    
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "organization")
    @JsonManagedReference
    private List<OrgPhotoalbum> photoalbum;
    
    
//    @ManyToOne(cascade={CascadeType.ALL})
//    @JoinColumn(name="PARENT_ORGANIZATION_ID",referencedColumnName="ORGANIZATION_ID",updatable=false,insertable=false)
//    @JsonIgnore
//    private Organization parent;
// 
//    @OneToMany(fetch = FetchType.LAZY,mappedBy="parent")
//    @JsonIgnore
//    private List<Organization> children;
    
    
    @Transient
    private String topOrganizationId;
    
    @Transient
    private Map<String,Object> classData;
    
    @Transient
    private short level;
    
    @Transient
    private Boolean  isParent ;
    
    public Map<String, Object> getClassData() {
        return classData;
    }
 
    public void setClassData(Map<String, Object> classData) {
        this.classData = classData;
    }
 
    public Organization() {
    }
    
    
    public String getTel() {
        return tel;
    }
 
    public void setTel(String tel) {
        this.tel = tel;
    }
 
    public String getLogoPath() {
        return logoPath;
    }
 
    public void setLogoPath(String logoPath) {
        this.logoPath = logoPath;
    }
 
    public String getOrganizationId() {
        return this.organizationId;
    }
 
    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }
 
    public String getCode() {
        return this.code;
    }
 
    public void setCode(String code) {
        this.code = code;
    }    
 
    public String getCreateId() {
        return this.createId;
    }
 
    public void setCreateId(String createId) {
        this.createId = createId;
    }
 
    public Date getCreateTime() {
        return this.createTime;
    }
 
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
 
    public String getCreator() {
        return this.creator;
    }
 
    public void setCreator(String creator) {
        this.creator = creator;
    }
 
    public String getDeleteFlag() {
        return this.deleteFlag;
    }
 
    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }
 
    public String getName() {
        return this.name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getUpdateId() {
        return this.updateId;
    }
 
    public void setUpdateId(String updateId) {
        this.updateId = updateId;
    }
 
    public Date getUpdateTime() {
        return this.updateTime;
    }
 
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
 
    public String getUpdator() {
        return this.updator;
    }
 
    public void setUpdator(String updator) {
        this.updator = updator;
    }
    
    public String getShortName() {
        return shortName;
    }
 
    public void setShortName(String shortName) {
        this.shortName = shortName;
    }
    
    public String getParentOrganizationId() {
        return parentOrganizationId;
    }
 
    public void setParentOrganizationId(String parentOrganizationId) {
        this.parentOrganizationId = parentOrganizationId;
    }
 
    public String getOrgCode() {
        return orgCode;
    }
 
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
    
    public List<OrgPhotoalbum> getPhotoalbum() {
        return photoalbum;
    }
 
    public void setPhotoalbum(List<OrgPhotoalbum> photoalbum) {
        this.photoalbum = photoalbum;
    }
 
 
    public List<OrgCollegeCourse> getCourses() {
        return courses;
    }
 
    public void setCourses(List<OrgCollegeCourse> courses) {
        this.courses = courses;
    }
 
    public List<OrgAdmin> getAdmins() {
        return admins;
    }
 
    public void setAdmins(List<OrgAdmin> admins) {
        this.admins = admins;
    }
 
    public List<OrgCharger> getChargers() {
        return chargers;
    }
 
    public void setChargers(List<OrgCharger> chargers) {
        this.chargers = chargers;
    }
 
    public List<OrgSalesman> getSalesmans() {
        return salesmans;
    }
 
    public void setSalesmans(List<OrgSalesman> salesmans) {
        this.salesmans = salesmans;
    }
 
    public List<OrgTeacher> getTeachers() {
        return teachers;
    }
 
    public void setTeachers(List<OrgTeacher> teachers) {
        this.teachers = teachers;
    }
 
    public String getType() {
        return type;
    }
 
    public void setType(String type) {
        this.type = type;
    }
 
    public short getLevel() {
        return level;
    }
 
    public void setLevel(short level) {
        this.level = level;
    }
/*
    public Organization getParent() {
        return parent;
    }
 
    public void setParent(Organization parent) {
        this.parent = parent;
    }
 
    public List<Organization> getChildren() {
        return children;
    }
 
    public void setChildren(List<Organization> children) {
        this.children = children;
    }*/
 
    public List<OrgCollegeCourse> getTopCourses() {
        return topCourses;
    }
 
    public void setTopCourses(List<OrgCollegeCourse> topCourses) {
        this.topCourses = topCourses;
    }
 
    public Boolean getIsparent() {
        return isParent;
    }
 
    public void setIsparent(Boolean isParent) {
        this.isParent = isParent;
    }
 
    public String getTopOrganizationId() {
        return topOrganizationId;
    }
 
    public void setTopOrganizationId(String topOrganizationId) {
        this.topOrganizationId = topOrganizationId;
    }
 
    public String getServerUrl() {
        return serverUrl;
    }
 
    public void setServerUrl(String serverUrl) {
        this.serverUrl = serverUrl;
    }
    
}