package com.qxueyou.scc.school.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.springframework.format.annotation.DateTimeFormat;
|
|
import com.qxueyou.scc.base.model.ITrace;
|
import com.qxueyou.scc.exercise.model.ExerciseChapter;
|
import com.qxueyou.scc.org.model.OrgTeacher;
|
import com.qxueyou.scc.teach.subject.model.Subject;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
//import com.qxueyou.scc.school.model.SchHandout;
|
|
|
/**
|
* 班级课表 实体类
|
* @author ody.yuan
|
*
|
*/
|
@Entity
|
@Table(name="SCH_CLASS_SCHEDULE")
|
//@NamedQuery(name="SchClassSchedule.findAll", query="SELECT s FROM SchClassSchedule s")
|
public class SchClassSchedule implements Serializable,ITrace {
|
private static final long serialVersionUID = 1L;
|
|
/** 上课类型 4:公共课程*/
|
public static final short SCHEDULE_TYPE_TO_START = 1;
|
|
public static final short SCHEDULE_TYPE_ON_GOING = 2;
|
|
public static final short SCHEDULE_TYPE_IS_COMPLETED= 3;
|
|
/**课程类型 1:公共课程 0:正常课程**/
|
public static final int SCHEDULE_TYPE_DEFAULT= 0;
|
public static final int SCHEDULE_TYPE_PUBLIC= 1;
|
|
/**面授*/
|
public static final String SCH_FACE = "FACE_TO_FACE";
|
/**网络*/
|
public static final String SCH_NETWORK = "NETWORK";
|
|
/** 课程主键 */
|
@Id
|
@GeneratedValue(generator = "hibernate-uuid")
|
@GenericGenerator(name = "hibernate-uuid", strategy = "uuid")
|
@Column(name="CLASS_SCHEDULE_ID", unique=true, nullable=false, length=32)
|
private String classScheduleId;
|
|
|
|
/** 课程名称*/
|
@Column(name="NAME", length=150)
|
private String name;
|
|
/** 状态 */
|
@Column(name="STATUS")
|
private short status;
|
|
// public List<SchHandout> getHandouts() {
|
// return handouts;
|
// }
|
//
|
// public void setHandouts(List<SchHandout> handouts) {
|
// this.handouts = handouts;
|
// }
|
|
/** 地址 */
|
@Column(name="ADDRESS", length=255)
|
private String address;
|
|
/** 结束时间 */
|
@Column(name="END_TIME", nullable=false)
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
private Date endTime;
|
|
/** 开始时间 */
|
@Column(name="START_TIME", nullable=false)
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
private Date startTime;
|
|
/** 班级ID */
|
@Column(name="CLASS_ID", length=32)
|
private String classId;
|
|
/** 上课内容,简介 */
|
@Column(name="CONTENT")
|
private String content;
|
|
/** 学校专业 */
|
@Column(name="COLLEGE_COURSE_ID", length=32)
|
private String collegeCourseId;
|
|
/** 高校课程ID,非高校,机构课程ID */
|
@Column(name="SUBJECT_ID", length=32)
|
private String subjectId;
|
|
/** 非高校,班级课程ID */
|
@Column(name="CLASS_SUBJECT_ID", length=32)
|
private String classSubjectId;
|
|
/** 图片路径 */
|
@Column(name="IMG_PATH", length=32)
|
private String imgPath;
|
|
/** 学期ID */
|
@Column(name="TERM_ID", length=32)
|
private String termId;
|
|
/** 上课地址ID */
|
@Column(name="ADDRESS_ID", length=32)
|
private String addressId;
|
|
/** 高校课表使用:第几节课开始ID */
|
@Column(name="DAY_START_ID", length=32)
|
private String dayStartId;
|
|
/** 高校课表使用:第几节课开始序号 */
|
@Column(name="DAY_START_ORDER")
|
private short dayStartOrder;
|
|
/** 高校课表使用:第几节课结束ID */
|
@Column(name="DAY_END_ID", length=32)
|
private String dayEndId;
|
|
/** 高校课表使用:第几节课结束序号 */
|
@Column(name="DAY_END_ORDER")
|
private short dayEndOrder;
|
|
@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)
|
private String creator;
|
|
@Column(name="DELETE_FLAG", nullable=false)
|
@JsonIgnore
|
private boolean deleteFlag;
|
|
/** TYPE 类型 */
|
@Column(name="TYPE")
|
private Integer type;
|
|
@OneToMany(fetch = FetchType.LAZY, mappedBy = "classSchedules")
|
@JsonIgnore
|
private List<ExerciseChapter> chapters;
|
|
@ManyToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY)
|
@JoinColumn(name = "TEACHER_ID",referencedColumnName="ORG_TEACHER_ID",updatable=false,insertable=false)
|
@JsonIgnore
|
private OrgTeacher teacherClassSchedule;
|
|
@Transient
|
private String handoutCount;
|
|
@Transient
|
private String teacherImg;
|
|
/** 课程模式(面授/网络) */
|
@Column(name="MODE", length=20)
|
private String mode;
|
|
@Column(name="SUBJECT_EXTEND_ID", length=32)
|
private String subjectExtendId;
|
|
/*
|
* 状态:未开始
|
*/
|
public static final short STATUS_NOT_START=0;
|
|
/*
|
* 状态:上课中
|
*/
|
public static final short STATUS_IN_PROGRESS=1;
|
|
/*
|
* 状态:结束
|
*/
|
public static final short STATUS_END=2;
|
|
@Column(name="TEACHER",length=50)
|
private String teacher;
|
|
@Column(name="TEACHER_ID", length=32)
|
private String teacherId;
|
|
@Column(name="UPDATE_ID", length=32)
|
private String updateId;
|
|
@Column(name="UPDATE_TIME", nullable=false)
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date updateTime;
|
|
@Column(name="UPDATOR", length=100)
|
private String updator;
|
|
@ManyToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY)
|
@JoinColumn(name = "SUBJECT_ID",referencedColumnName="SUBJECT_ID",updatable=false,insertable=false)
|
@JsonIgnore
|
private Subject subject;
|
|
public Subject getSubject() {
|
return subject;
|
}
|
|
public void setSubject(Subject subject) {
|
this.subject = subject;
|
}
|
|
public String getMode() {
|
return mode;
|
}
|
|
public void setMode(String mode) {
|
this.mode = mode;
|
}
|
|
public String getSubjectExtendId() {
|
return subjectExtendId;
|
}
|
|
public void setSubjectExtendId(String subjectExtendId) {
|
this.subjectExtendId = subjectExtendId;
|
}
|
|
public String getAddress() {
|
return address;
|
}
|
|
public void setAddress(String address) {
|
this.address = address;
|
}
|
|
public Integer getType() {
|
return type;
|
}
|
|
public void setType(Integer type) {
|
this.type = type;
|
}
|
|
public Date getEndTime() {
|
return endTime;
|
}
|
|
public void setEndTime(Date endTime) {
|
this.endTime = endTime;
|
}
|
|
public Date getStartTime() {
|
return startTime;
|
}
|
|
public void setStartTime(Date startTime) {
|
this.startTime = startTime;
|
}
|
|
public String getClassId() {
|
return this.classId;
|
}
|
|
public void setClassId(String classId) {
|
this.classId = classId;
|
}
|
|
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 getStatusAlias() {
|
switch(this.status){
|
case STATUS_NOT_START:return "未开始";
|
case STATUS_IN_PROGRESS:return "进行中";
|
case STATUS_END:return "已结束";
|
default:return "未开始";
|
}
|
}
|
|
public short getStatus() {
|
return this.status;
|
}
|
|
public void setStatus(short status) {
|
this.status = status;
|
}
|
|
public String getTeacher() {
|
return this.teacher;
|
}
|
|
public void setTeacher(String teacher) {
|
this.teacher = teacher;
|
}
|
|
public String getTeacherId() {
|
return this.teacherId;
|
}
|
|
public void setTeacherId(String teacherId) {
|
this.teacherId = teacherId;
|
}
|
|
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<ExerciseChapter> getChapters() {
|
return chapters;
|
}
|
|
public void setChapters(List<ExerciseChapter> chapters) {
|
this.chapters = chapters;
|
}
|
|
public String getHandoutCount() {
|
return handoutCount;
|
}
|
|
public void setHandoutCount(String handoutCount) {
|
this.handoutCount = handoutCount;
|
}
|
|
public String getTeacherImg() {
|
return teacherImg;
|
}
|
|
public void setTeacherImg(String teacherImg) {
|
this.teacherImg = teacherImg;
|
}
|
|
public String getCollegeCourseId() {
|
return collegeCourseId;
|
}
|
|
public void setCollegeCourseId(String collegeCourseId) {
|
this.collegeCourseId = collegeCourseId;
|
}
|
|
public String getSubjectId() {
|
return subjectId;
|
}
|
|
public void setSubjectId(String subjectId) {
|
this.subjectId = subjectId;
|
}
|
|
public String getImgPath() {
|
return imgPath;
|
}
|
|
public void setImgPath(String imgPath) {
|
this.imgPath = imgPath;
|
}
|
|
public String getTermId() {
|
return termId;
|
}
|
|
public void setTermId(String termId) {
|
this.termId = termId;
|
}
|
|
public String getAddressId() {
|
return addressId;
|
}
|
|
public void setAddressId(String addressId) {
|
this.addressId = addressId;
|
}
|
|
public OrgTeacher getTeacherClassSchedule() {
|
return teacherClassSchedule;
|
}
|
|
public void setTeacherClassSchedule(OrgTeacher teacherClassSchedule) {
|
this.teacherClassSchedule = teacherClassSchedule;
|
}
|
|
public String getClassScheduleId() {
|
return classScheduleId;
|
}
|
|
public void setClassScheduleId(String classScheduleId) {
|
this.classScheduleId = classScheduleId;
|
}
|
|
public String getDayStartId() {
|
return dayStartId;
|
}
|
|
public void setDayStartId(String dayStartId) {
|
this.dayStartId = dayStartId;
|
}
|
|
public short getDayStartOrder() {
|
return dayStartOrder;
|
}
|
|
public void setDayStartOrder(short dayStartOrder) {
|
this.dayStartOrder = dayStartOrder;
|
}
|
|
public String getDayEndId() {
|
return dayEndId;
|
}
|
|
public void setDayEndId(String dayEndId) {
|
this.dayEndId = dayEndId;
|
}
|
|
public short getDayEndOrder() {
|
return dayEndOrder;
|
}
|
|
public void setDayEndOrder(short dayEndOrder) {
|
this.dayEndOrder = dayEndOrder;
|
}
|
|
public String getClassSubjectId() {
|
return classSubjectId;
|
}
|
|
public void setClassSubjectId(String classSubjectId) {
|
this.classSubjectId = classSubjectId;
|
}
|
|
}
|