派生自 projectDept/qhighschool

yn147
2023-05-25 c633da3dea47fcf096636c66e76bc470fccb7b69
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
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
package com.etraining.qxueyou.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.GeneratedValue;
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.Transient;
 
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;
 
import com.etraining.qxueyou.base.model.ITrace;
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,ITrace {
    
    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
    @GeneratedValue(generator = "hibernate-uuid")
    @GenericGenerator(name = "hibernate-uuid", strategy = "uuid")
    @Column(name="ORGANIZATION_ID", unique=true, nullable=false, length=32)
    private String organizationId;
 
    @Column(name="ADDRESS",length=255)
    private String address;
 
    @Column(name="CITY",length=32)
    private String city;
    
    @Column(name="PROVINCE",length=255)
    private String province;
 
    @Column(name="CODE_",length=32)
    private String code;
 
    @Column(name="CONTACTOR",length=64)
    private String contactor;
 
    @Column(name="ORG_CONTENT")
    private String content;
    
    @Column(name="HIGH_CODE",length=255)
    private String highCode;
 
    @Column(name="CREATE_ID", nullable=false, length=32)
    @JsonIgnore
    private String createId;
 
    @Column(name="CREATE_TIME", nullable=false)
    @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="DELETE_FLAG", nullable=false)
    @JsonIgnore
    private boolean deleteFlag;
    
    @Column(name="SHORT_NAME", length=150)
    private String shortName;
    
    @Column(name="ORG_NAME", length=150)
    private String name;
 
    @Column(name="TEL", length=32)
    private String tel;
    
    @Column(name="REFERRER_TEL", length=32)
    private String referrerTel;
 
    @Column(name="UPDATE_ID", length=32)
    @JsonIgnore
    private String updateId;
 
    @Column(name="UPDATE_TIME", nullable=false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonIgnore
    private Date updateTime;
 
    @Column(name="UPDATOR", length=100)
    @JsonIgnore
    private String updator;
    
    @Column(name="LOGO_PATH", length=255)
    private String logoPath;
    
    @Column(name="INDUSTRY", length=255)
    private String industry;
    
    /**  ¾Ù°ìÕß */
    @Column(name="ORG_HOST", length=100)
    private String orgHost;
    
    /**  ÍøÖ·  */
    @Column(name="WEBSITE", length=100)
    private String website;
    
    /**  ¾­¶È  */
    @Column(name="LONGITUDE_X", length=100)
    private String longitudeX;
    
    /**  Î³¶È  */
    @Column(name="LATITUDE_Y", length=100)
    private String latitudeY;
    
    /**  ÀàÐÍ£º£¨1.Ö°ÒµÅàѵ 2.ѧÀú½ÌÓý3.ÆóÒµÄÚѵ 4.»î¶¯É³Áú5.´úÀí»ú¹¹£©  */
    @Column(name="ORG_TYPE", length=6)
    private short type;
    
    @Column(name="LEVEL", length=1)
    private short level;
    
    /** ÊÇ·ñÊÔÓñêÖ¾ **/
    @Column(name="TRAIL_FLAG", nullable=false)
    @JsonIgnore
    private boolean traiFlag;
    
    @Column(name="PARENT_ORGANIZATION_ID", length=32)
    private String parentOrganizationId;
    
    @Column(name="ORG_CODE", length=64)
    private String orgCode;
    
    @Column(name="TOP_ORGANIZATION_ID", length=32)
    private String topOrganizationId;
    
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "org")
    @JsonManagedReference
    @JsonIgnore
    private List<OrgClass> classes;
    
    @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(mappedBy="parent")
    @JsonIgnore
    private List<Organization> children;
    
    @Transient
    private Map<String,Object> classData;
    
    
    
    public List<OrgClass> getClasses() {
        return classes;
    }
 
    public void setClasses(List<OrgClass> classes) {
        this.classes = classes;
    }
 
    public Map<String, Object> getClassData() {
        return classData;
    }
 
    public void setClassData(Map<String, Object> classData) {
        this.classData = classData;
    }
 
    public Organization() {
    }
    
    public List<OrgPhotoalbum> getPhotoalbum() {
        return photoalbum;
    }
 
    public void setPhotoalbum(List<OrgPhotoalbum> photoalbum) {
        this.photoalbum = photoalbum;
    }
 
    public String getOrganizationId() {
        return this.organizationId;
    }
 
    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }
 
    public String getAddress() {
        return this.address;
    }
 
    public void setAddress(String address) {
        this.address = address;
    }
 
    public String getCity() {
        return this.city;
    }
 
    public void setCity(String city) {
        this.city = city;
    }
 
    public String getCode() {
        return this.code;
    }
 
    public void setCode(String code) {
        this.code = code;
    }
 
    public String getContactor() {
        return this.contactor;
    }
 
    public void setContactor(String contactor) {
        this.contactor = contactor;
    }
 
    public String getContent() {
        return this.content;
    }
 
    public void setContent(String content) {
        this.content = content;
    }
 
    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 boolean getDeleteFlag() {
        return this.deleteFlag;
    }
 
    public void setDeleteFlag(boolean deleteFlag) {
        this.deleteFlag = deleteFlag;
    }
 
    public String getName() {
        return this.name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getTel() {
        return this.tel;
    }
 
    public void setTel(String tel) {
        this.tel = tel;
    }
 
    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 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 getShortName() {
        return shortName;
    }
 
    public void setShortName(String shortName) {
        this.shortName = shortName;
    }
 
    public String getLogoPath() {
        return logoPath;
    }
 
    public void setLogoPath(String logoPath) {
        this.logoPath = logoPath;
    }
 
    public String getOrgHost() {
        return orgHost;
    }
 
    public void setOrgHost(String orgHost) {
        this.orgHost = orgHost;
    }
 
    public String getWebsite() {
        return website;
    }
 
    public void setWebsite(String website) {
        this.website = website;
    }
 
    public short getType() {
        return type;
    }
 
    public void setType(short type) {
        this.type = type;
    }
 
    public short getLevel() {
        return level;
    }
 
    public void setLevel(short level) {
        this.level = level;
    }
 
    public String getParentOrganizationId() {
        return parentOrganizationId;
    }
 
    public void setParentOrganizationId(String parentOrganizationId) {
        this.parentOrganizationId = parentOrganizationId;
    }
 
    public String getHighCode() {
        return highCode;
    }
 
    public void setHighCode(String highCode) {
        this.highCode = highCode;
    }
 
    public String getIndustry() {
        return industry;
    }
 
    public void setIndustry(String industry) {
        this.industry = industry;
    }
 
    public String getProvince() {
        return province;
    }
 
    public void setProvince(String province) {
        this.province = province;
    }
 
    public String getOrgCode() {
        return orgCode;
    }
 
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
 
    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 String getTopOrganizationId() {
        return topOrganizationId;
    }
 
    public void setTopOrganizationId(String topOrganizationId) {
        this.topOrganizationId = topOrganizationId;
    }
 
    public String getLongitudeX() {
        return longitudeX;
    }
 
    public void setLongitudeX(String longitudeX) {
        this.longitudeX = longitudeX;
    }
 
    public String getLatitudeY() {
        return latitudeY;
    }
 
    public void setLatitudeY(String latitudeY) {
        this.latitudeY = latitudeY;
    }
 
    public boolean getTraiFlag() {
        return traiFlag;
    }
 
    public void setTraiFlag(boolean traiFlag) {
        this.traiFlag = traiFlag;
    }
 
    public List<OrgCollegeCourse> getTopCourses() {
        return topCourses;
    }
 
    public void setTopCourses(List<OrgCollegeCourse> topCourses) {
        this.topCourses = topCourses;
    }
 
    public String getReferrerTel() {
        return referrerTel;
    }
 
    public void setReferrerTel(String referrerTel) {
        this.referrerTel = referrerTel;
    }
    
}