package com.qxueyou.scc.org.model;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
import java.util.List;
|
|
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.hibernate.annotations.Where;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.qxueyou.scc.base.model.ITrace;
|
|
/**
|
* The persistent class for the org_course_category database table.
|
*
|
*/
|
@Entity
|
@Table(name = "org_course_category")
|
@NamedQuery(name = "OrgCourseCategory.findAll", query = "SELECT o FROM OrgCourseCategory o")
|
public class OrgCourseCategory implements Serializable, ITrace {
|
|
private static final long serialVersionUID = 1L;
|
|
public static final short CATEGORY_LEVEL_FIRST = 1;
|
|
public static final short CATEGORY_LEVEL_SECOND = 2;
|
|
public static final short CATEGORY_LEVEL_THIRD = 3;
|
|
@Id
|
@GeneratedValue(generator = "hibernate-uuid")
|
@GenericGenerator(name = "hibernate-uuid", strategy = "uuid")
|
@Column(name = "CATEGORY_ID", unique = true, nullable = false, length = 32)
|
private String categoryId;
|
|
@Column(name = "CATEGORY_LEVEL", nullable = false)
|
private short categoryLevel;
|
|
@Column(name = "CATEGORY_NAME", nullable = false, length = 150)
|
private String categoryName;
|
|
@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 = "FULL_NAME", length = 255)
|
private String fullName;
|
|
@Column(name = "PARENT_CATEGORY_ID", length = 32)
|
private String parentCategoryId;
|
|
@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;
|
|
/** 类型:(1.职业培训 2.学历教育3.企业内训 4.活动沙龙5.代理机构) */
|
@Column(name = "TYPE")
|
private Short type;
|
|
/** 编码 */
|
@Column(name = "CODE", length = 100)
|
private String code;
|
|
@Column(name = "IMG_PATH", length = 255)
|
private String imgPath;
|
|
/** 本科、专科、研究生、博士生 */
|
@Column(name = "CATEGORY_TYPE", length = 6)
|
private Short categoryType;
|
|
/*
|
* @OneToMany(fetch = FetchType.LAZY, mappedBy = "category")
|
*
|
* @JsonIgnore private List<OrgCollegeCourse> courses;
|
*/
|
|
@ManyToOne(cascade = { CascadeType.ALL })
|
@JoinColumn(name = "PARENT_CATEGORY_ID", referencedColumnName = "CATEGORY_ID", updatable = false, insertable = false)
|
@JsonIgnore
|
private OrgCourseCategory parent;
|
|
@OneToMany(mappedBy = "parent")
|
@Where(clause = "DELETE_FLAG=0")
|
@JsonIgnore
|
private List<OrgCourseCategory> children;
|
|
@OneToMany(fetch = FetchType.LAZY, mappedBy = "orgCourseCategory")
|
@JsonIgnore
|
private List<OrgCourse> orgCourses;
|
|
@Transient
|
private List<OrgCollegeCourse> courseList;
|
|
@Transient
|
private List<OrgCourseCategory> childrenList;
|
|
@Transient
|
private List<OrgCourse> lstCourses;
|
|
public List<OrgCourse> getLstCourses() {
|
return lstCourses;
|
}
|
|
public void setLstCourses(List<OrgCourse> lstCourses) {
|
this.lstCourses = lstCourses;
|
}
|
|
public List<OrgCourseCategory> getChildrenList() {
|
return childrenList;
|
}
|
|
public void setChildrenList(List<OrgCourseCategory> childrenList) {
|
this.childrenList = childrenList;
|
}
|
|
public String getCategoryId() {
|
return this.categoryId;
|
}
|
|
public void setCategoryId(String categoryId) {
|
this.categoryId = categoryId;
|
}
|
|
public short getCategoryLevel() {
|
return this.categoryLevel;
|
}
|
|
public Short getType() {
|
return type;
|
}
|
|
public void setType(Short type) {
|
this.type = type;
|
}
|
|
public void setCategoryLevel(short categoryLevel) {
|
this.categoryLevel = categoryLevel;
|
}
|
|
public String getCategoryName() {
|
return this.categoryName;
|
}
|
|
public void setCategoryName(String categoryName) {
|
this.categoryName = categoryName;
|
}
|
|
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 getFullName() {
|
return this.fullName;
|
}
|
|
public void setFullName(String fullName) {
|
this.fullName = fullName;
|
}
|
|
public String getParentCategoryId() {
|
return this.parentCategoryId;
|
}
|
|
public void setParentCategoryId(String parentCategoryId) {
|
this.parentCategoryId = parentCategoryId;
|
}
|
|
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<OrgCollegeCourse> getCourseList() {
|
return courseList;
|
}
|
|
public void setCourseList(List<OrgCollegeCourse> courseList) {
|
this.courseList = courseList;
|
}
|
|
public String getCode() {
|
return code;
|
}
|
|
public void setCode(String code) {
|
this.code = code;
|
}
|
|
public String getImgPath() {
|
return imgPath;
|
}
|
|
public void setImgPath(String imgPath) {
|
this.imgPath = imgPath;
|
}
|
|
public OrgCourseCategory getParent() {
|
return parent;
|
}
|
|
public void setParent(OrgCourseCategory parent) {
|
this.parent = parent;
|
}
|
|
public List<OrgCourseCategory> getChildren() {
|
return children;
|
}
|
|
public void setChildren(List<OrgCourseCategory> children) {
|
this.children = children;
|
}
|
|
public List<OrgCourse> getOrgCourses() {
|
return orgCourses;
|
}
|
|
public void setOrgCourses(List<OrgCourse> orgCourses) {
|
this.orgCourses = orgCourses;
|
}
|
|
public Short getCategoryType() {
|
return categoryType;
|
}
|
|
public void setCategoryType(Short categoryType) {
|
this.categoryType = categoryType;
|
}
|
|
}
|