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;
|
}
|
|
}
|