package com.qxueyou.scc.school.model; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; 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.fasterxml.jackson.annotation.JsonIgnore; /** * 讲义实体类 * * @author ody.yuan * */ @Entity @Table(name = "sch_handout") @NamedQuery(name = "SchHandout.findAll", query = "SELECT s FROM SchHandout s") public class SchHandout implements Serializable, ITrace { private static final long serialVersionUID = 1L; /** 讲义ID */ @Id @GeneratedValue(generator = "hibernate-uuid") @GenericGenerator(name = "hibernate-uuid", strategy = "uuid") @Column(name = "HANDOUT_ID", unique = true, nullable = false, length = 32) private String handoutId; @Column(name = "CREATE_ID", nullable = false, length = 32) @JsonIgnore private String createId; /** 注意:此处的createTime需要返回前台app 不能用@JsonIgnore */ @Column(name = "CREATE_TIME", nullable = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; @Column(name = "CREATOR", nullable = false, length = 100) @JsonIgnore private String creator; /** 文件原始路径 */ @Column(name = "ORIG_PATH") @JsonIgnore private String origPath; @Column(name = "DELETE_FLAG", nullable = false) @JsonIgnore private boolean deleteFlag; /** 班级课表ID */ @Column(name = "CLASS_SCHEDULE_ID", length = 32) private String classScheduleId; /** 班级课表 */ @Column(name = "CLASS_SCHEDULE", length = 150) private String classSchedule; /** 班级ID */ @Column(name = "CLASS_ID", length = 32) private String classId; /** 讲义名称 */ @Column(name = "NAME", length = 150) private String name; /** 讲义观看数量 */ @Column(name = "PLAY_COUNT", length = 11) private Integer playCount; /** 讲义页码数量,总共多少页 */ @Column(name = "PAGE_COUNT") private Integer pageCount; /** 原始讲义ID */ @Column(name = "ORIGIN_HANDOUT_ID", length = 32) private String originHandoutId; /** 机构ID */ @Column(name = "ORG_ID", length = 32) private String orgId; /** 讲义收藏列表:表明当前收藏的讲义 页码总数,非收藏的页码数 */ @Transient private int totalCount; @Column(name = "UPDATE_ID", length = 32) @JsonIgnore 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) @JsonIgnore private String updator; /** 讲义状态 0 草稿;1已发布;2已废弃;3处理中;4处理失败 */ @Column(name = "STATUS") private short status; /** 课程ID */ @Column(name = "SUBJECT_ID", length = 32) private String subjectId; /** 课程名字 */ @Column(name = "SUBJECT_NAME", length = 255) private String subjectName; /** 科目ID */ @Column(name = "COLLEGE_COURSE_ID", length = 32) private String collegeCourseId; /** 详情介绍 */ @Column(name = "remark", length = 4000) private String remark; /** 封面图片URL */ @Column(name = "COVER_PAGE_URL", length = 256) private String coverPageUrl; /** 下载路径URL */ @Column(name = "FULL_PATH", length = 256) @JsonIgnore private String fullPath; /** 讲义大小 */ @Column(name = "FULL_LENGTH") private Integer fullLength; /** 讲义完成度 */ @Transient private BigDecimal compDegree; /** 草稿 */ public final static short STATUS_DRAFT = 0; /** 已发布 */ public final static short STATUS_ISSUED = 1; /** 已废弃 */ public final static short STATUS_DISCARD = 2; /** 处理中 */ public final static short STATUS_PROCESSING = 3; /** 处理失败 */ public final static short STATUS_FAILURE = 4; @OneToMany(fetch = FetchType.LAZY, mappedBy = "handout") @JsonIgnore private List handoutPages; /** 讲义管理排序,班主任排序 */ @Column(name = "ORDER_NUM") private Integer orderNum; @Column(name = "CHAPTER_ID") private String chapterId; public String getChapterId() { return chapterId; } public void setChapterId(String chapterId) { this.chapterId = chapterId; } /** * @return the handoutId */ public String getHandoutId() { return handoutId; } /** * @param handoutId * the handoutId to set */ public void setHandoutId(String handoutId) { this.handoutId = handoutId; } /** * @return the createId */ public String getCreateId() { return createId; } /** * @param createId * the createId to set */ public void setCreateId(String createId) { this.createId = createId; } /** * @return the createTime */ public Date getCreateTime() { return createTime; } /** * @param createTime * the createTime to set */ public void setCreateTime(Date createTime) { this.createTime = createTime; } /** * @return the creator */ public String getCreator() { return creator; } /** * @param creator * the creator to set */ public void setCreator(String creator) { this.creator = creator; } /** * @return the deleteFlag */ public boolean getDeleteFlag() { return deleteFlag; } /** * @param deleteFlag * the deleteFlag to set */ public void setDeleteFlag(boolean deleteFlag) { this.deleteFlag = deleteFlag; } /** * @return the classScheduleId */ public String getClassScheduleId() { return classScheduleId; } /** * @param classScheduleId * the classScheduleId to set */ public void setClassScheduleId(String classScheduleId) { this.classScheduleId = classScheduleId; } /** * @return the classSchedule */ public String getClassSchedule() { return classSchedule; } /** * @param classSchedule * the classSchedule to set */ public void setClassSchedule(String classSchedule) { this.classSchedule = classSchedule; } /** * @return the classId */ public String getClassId() { return classId; } /** * @param classId * the classId to set */ public void setClassId(String classId) { this.classId = classId; } /** * @return the name */ public String getName() { return name; } /** * @param name * the name to set */ public void setName(String name) { this.name = name; } /** * @return the playCount */ public Integer getPlayCount() { return playCount; } /** * @param playCount * the playCount to set */ public void setPlayCount(Integer playCount) { this.playCount = playCount; } /** * @return the pageCount */ public Integer getPageCount() { return pageCount; } /** * @param pageCount * the pageCount to set */ public void setPageCount(Integer pageCount) { this.pageCount = pageCount; } /** * @return the originHandoutId */ public String getOriginHandoutId() { return originHandoutId; } /** * @param originHandoutId * the originHandoutId to set */ public void setOriginHandoutId(String originHandoutId) { this.originHandoutId = originHandoutId; } /** * @return the orgId */ public String getOrgId() { return orgId; } /** * @param orgId * the orgId to set */ public void setOrgId(String orgId) { this.orgId = orgId; } /** * @return the totalCount */ public int getTotalCount() { return totalCount; } /** * @param totalCount * the totalCount to set */ public void setTotalCount(int totalCount) { this.totalCount = totalCount; } /** * @return the updateId */ public String getUpdateId() { return updateId; } /** * @param updateId * the updateId to set */ public void setUpdateId(String updateId) { this.updateId = updateId; } /** * @return the updateTime */ public Date getUpdateTime() { return updateTime; } /** * @param updateTime * the updateTime to set */ public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } /** * @return the updator */ public String getUpdator() { return updator; } /** * @param updator * the updator to set */ public void setUpdator(String updator) { this.updator = updator; } /** * @return the status */ public short getStatus() { return status; } /** * @param status * the status to set */ public void setStatus(short status) { this.status = status; } /** * @return the subjectId */ public String getSubjectId() { return subjectId; } /** * @param subjectId * the subjectId to set */ public void setSubjectId(String subjectId) { this.subjectId = subjectId; } /** * @return the subjectName */ public String getSubjectName() { return subjectName; } /** * @param subjectName * the subjectName to set */ public void setSubjectName(String subjectName) { this.subjectName = subjectName; } /** * @return the collegeCourseId */ public String getCollegeCourseId() { return collegeCourseId; } /** * @param collegeCourseId * the collegeCourseId to set */ public void setCollegeCourseId(String collegeCourseId) { this.collegeCourseId = collegeCourseId; } /** * @return the compDegree */ public BigDecimal getCompDegree() { return compDegree; } /** * @param compDegree * the compDegree to set */ public void setCompDegree(BigDecimal compDegree) { this.compDegree = compDegree; } /** * @return the handoutPages */ public List getHandoutPages() { return handoutPages; } /** * @param handoutPages * the handoutPages to set */ public void setHandoutPages(List handoutPages) { this.handoutPages = handoutPages; } /** * @return the mainImg */ public String getMainImg() { return coverPageUrl; } /** * @return the orderNum */ public Integer getOrderNum() { return orderNum; } /** * @param orderNum * the orderNum to set */ public void setOrderNum(Integer orderNum) { this.orderNum = orderNum; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } /** * @return the coverPageUrl */ public String getCoverPageUrl() { return coverPageUrl; } /** * @param coverPageUrl * the coverPageUrl to set */ public void setCoverPageUrl(String coverPageUrl) { this.coverPageUrl = coverPageUrl; } public String getFullPath() { return fullPath; } public void setFullPath(String fullPath) { this.fullPath = fullPath; } public Integer getFullLength() { return fullLength; } public void setFullLength(Integer fullLength) { this.fullLength = fullLength; } public String getOrigPath() { return origPath; } public void setOrigPath(String origPath) { this.origPath = origPath; } }