package com.qxueyou.scc.teach.live.model;
|
|
import java.io.Serializable;
|
import java.math.BigInteger;
|
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.JoinTable;
|
import javax.persistence.ManyToMany;
|
import javax.persistence.OneToMany;
|
import javax.persistence.OneToOne;
|
import javax.persistence.Table;
|
import javax.persistence.Transient;
|
|
import org.hibernate.annotations.CollectionId;
|
import org.hibernate.annotations.GenericGenerator;
|
import org.hibernate.annotations.Type;
|
import org.hibernate.annotations.Where;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.qxueyou.scc.admin.classes.model.ClsClass;
|
import com.qxueyou.scc.base.model.ITrace;
|
import com.qxueyou.scc.media.model.MediaVideo;
|
import com.qxueyou.scc.media.model.SchLiveReVideo;
|
import com.qxueyou.scc.media.model.VideoLiveChatroom;
|
import com.qxueyou.scc.teach.subject.model.Subject;
|
|
|
/**
|
* 视频直播表 实体
|
* @author ody.yuan
|
*
|
*/
|
/**
|
* @author ody.yuan
|
*
|
*/
|
@Entity
|
@Table(name="MEDIA_VIDEO_LIVE")
|
public class MediaVideoLive implements Serializable, ITrace {
|
|
/**
|
* UID
|
*/
|
private static final long serialVersionUID = -313139100670956005L;
|
|
/** 草稿,新增直播默认状态 */
|
public static final short STATUS_LIVE_DRAFT = 0;
|
|
/** 预告,当前不在直播状态 */
|
public static final short STATUS_LIVE_ORDER = 1;
|
|
/** 直播 中,正在直播*/
|
public static final short STATUS_LIVE_LIVE = 2;
|
|
/** 回放 */
|
public static final short STATUS_LIVE_REVIEW = 3;
|
|
/** 废弃,后台查询不到网易直播的房间信息状态 */
|
public static final short STATUS_LIVE_TAKEOFF = 4;
|
|
/** 暂停 ,直播中的暂停状态*/
|
public static final short STATUS_LIVE_PAUSE = 5;
|
|
/** 回放下载中 ,下载完成后才是回放状态*/
|
public static final short STATUS_LIVE_DOWNLOAD = 6;
|
|
/** 回放下载失败*/
|
public static final short STATUS_LIVE_DOWNLOAD_ERROR = 8;
|
|
/** 回放下载成功*/
|
public static final short STATUS_LIVE_DOWNLOAD_SUCCESS = 7;
|
|
/** 停止直播*/
|
public static final short STATUS_LIVE_STOP = 9;
|
|
/** 待编辑状态*/
|
public static final short STATUS_LIVE_PREPARED = 10;
|
|
/** 预处理失败*/
|
public static final short STATUS_LIVE_PREPARE_FAILD = 11;
|
|
/** 编辑准备中*/
|
public static final short STATUS_LIVE_PREPARED_READY = 12;
|
|
/** 仅限班级 */
|
public static final String PERMISSION_STATUS_LIMITCLASS = "limitClass";
|
|
/** 公开 */
|
public static final String PERMISSION_STATUS_PUBLIC = "public";
|
|
/** 仅限机构 */
|
public static final String PERMISSION_STATUS_LIMITORG = "limitOrg";
|
|
/** 预约观看 */
|
public static final String PERMISSION_STATUS_ORDERWATCH = "orderWatch";
|
|
/** 直播 */
|
public static final int TYPE_LIVE_LIVE = 1;
|
|
/** 回放 */
|
public static final int TYPE_LIVE_DOWNLOAD = 2;
|
|
/** 主键 */
|
@Id
|
@GeneratedValue(generator = "hibernate-uuid")
|
@GenericGenerator(name = "hibernate-uuid", strategy = "uuid")
|
@Column(name="VIDEO_LIVE_ID", unique=true, nullable=false, length=32)
|
private String videoLiveId;
|
|
/** 创建者ID */
|
@Column(name="CREATE_ID", length=32)
|
private String createId;
|
|
/** 创建时间 */
|
@Column(name="CREATE_TIME", nullable=false)
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
/** 创建人 */
|
@Column(name="CREATOR", length=100)
|
private String creator;
|
|
/** 删除标志 */
|
@Column(name="DELETE_FLAG", nullable=false)
|
private boolean deleteFlag;
|
|
/** 是否自动生成回放(0、是,1、否。默认为0) */
|
@Column(name="EDIT_REPLAY_FLAG", nullable=false)
|
private boolean editReplayFlag;
|
|
/** 修改人ID */
|
@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;
|
|
/** 名称 */
|
@Column(name="NAME", length=128)
|
private String name;
|
|
/** 状态 1:预告 2 直播 3 回放 4 废弃 */
|
@Column(name="STATUS")
|
private short status;
|
|
/** 直播人ID */
|
@Column(name="ANCHOR_ID", length=32)
|
private String anchorId;
|
|
/** 直播人 */
|
@Column(name="ANCHOR", length=128)
|
private String anchor;
|
|
/** 预告图片URL */
|
@Column(name="PREVIEW_IMG_URL",length=256)
|
private String previewImgUrl;
|
|
/** 咨询图片URL */
|
@Column(name="CONSULT_IMG_URL",length=256)
|
private String consultImgUrl;
|
|
/** 预告片视频URL */
|
@Column(name="PREVIEW_VIDEO_URL",length=256)
|
private String previewVideoUrl;
|
|
/** 预约次数 */
|
@Column(name="ORDER_TIMES")
|
private Integer orderTimes;
|
|
/** 直播观看人次 */
|
@Column(name="WATCH_TIMES")
|
private Integer watchTimes;
|
|
/** 点赞人次 */
|
@Column(name="PRAISE_TIMES")
|
private Integer praiseTimes;
|
|
/** 直播最高观看人次 */
|
@Column(name="WATCH_MAX_TIMES")
|
private Integer watchMaxTimes;
|
|
/** 回放次数 */
|
@Column(name="REVIEW_TIMES")
|
private Integer reviewTimes;
|
|
/** 报名人数上限 */
|
@Column(name="WATCHER_LIMIT")
|
private Integer watcherLimit;
|
|
/** 备注详情 */
|
@Column(name="REMARK", length=16777215)
|
private String remark;
|
|
/** 直播预计开始时间 */
|
@Column(name="START_TIME")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
private Date startTime;
|
|
/** 直播预计结束时间 */
|
@Column(name="END_TIME")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
private Date endTime;
|
|
/** 是否按时开始直播,误差5分钟内 */
|
@Column(name="ON_TIME_FLAG")
|
private boolean onTimeFlag;
|
|
/** 是否有完成直播 */
|
@Column(name="COMPLETE_FLAG")
|
private boolean completeFlag;
|
|
/** 腾讯云房间号码 */
|
@Column(name="TECENT_LIVE_NUMBER", length=128)
|
private String tecentLiveNumber;
|
|
/** 网易云信房间号码 */
|
@Column(name="WY_LIVE_NUMBER", length=128)
|
private String wyLiveNumber;
|
|
/** 网易云信直播推流url */
|
@Column(name="WY_PUSH_URL", length=128)
|
private String pushUrl;
|
|
/** 网易云信直播拉流:httpPullUrl */
|
@Column(name="WY_HTTP_PULL_URL", length=128)
|
private String httpPullUrl;
|
|
/** 网易云信直播拉流:hlsPullUrl */
|
@Column(name="WY_HLS_PULL_URL", length=128)
|
private String hlsPullUrl;
|
|
/** 网易云信直播拉流:rtmpPullUrl */
|
@Column(name="WY_RTMP_PULL_URL", length=128)
|
private String rtmpPullUrl;
|
|
/** 权限:limitClass:仅限班级 public:公开 orderWatch:预约观看 limitOrg:仅限机构 */
|
@Column(name="PERMISSION", length=32)
|
private String permission;
|
|
/** 清晰度 LD:流畅 SD:标清 HD:高清 */
|
@Column(name="DEFINITION", length=32)
|
private String definition;
|
|
/** 预计时长 单位:分钟 */
|
@Column(name="EXPECTED_TIMES")
|
private Integer expectedTimes;
|
|
/** 实际播放时长 单位:秒 */
|
@Column(name="PLAY_TIMES")
|
private BigInteger playTimes;
|
|
/** 分享次数 */
|
@Column(name="SHARE_TIMES")
|
private BigInteger shareTimes;
|
|
/** 扩展字段(显示异常、预处理失败及进度条) */
|
@Column(name="ATTRIBUTE")
|
private String attribute;
|
|
/** 网易状态回调,记录最后录制时间 */
|
@Column(name="LAST_RECORD_TIME")
|
@JsonIgnore
|
private long lastRecordTime;
|
|
/** 唐桥会议id */
|
@Column(name="TQ_MEETING_ID", length=32)
|
private String meetingId;
|
|
/** 唐桥加入课堂密码 */
|
@Column(name="TQ_MEETING_PWD", length=32)
|
private String meetingPwd;
|
|
@OneToMany(fetch = FetchType.LAZY, mappedBy = "videoLive")
|
@JsonIgnore
|
private List<SchLiveReVideo> liveReVideos;
|
|
@OneToMany(fetch = FetchType.LAZY, mappedBy = "mediaVideoLive")
|
@JsonIgnore
|
private List<VideoLiveChatroom> videoLiveChatrooms;
|
|
@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
|
@JoinTable(name = "MEDIA_VIDEO_LIVE_RE_CLASS", joinColumns = {
|
@JoinColumn(name = "LIVE_ID") },
|
inverseJoinColumns = { @JoinColumn(name = "CLASS_ID") })
|
@GeneratedValue(generator = "hibernate-uuid")
|
@GenericGenerator(name = "hibernate-uuid", strategy = "uuid")
|
@CollectionId(
|
columns = @Column(name="LIVE_RE_CLASS_ID"),
|
type=@Type(type="string"),
|
generator = "hibernate-uuid"
|
)
|
@Where(clause="DELETE_FLAG=0")
|
private List<ClsClass> classes;
|
|
@Transient
|
private List<MediaVideo> lstVideoVO;
|
|
@Column(name="SUBJECT_ID")
|
private String subjectId;
|
|
@Column(name="SUBJECT_NAME")
|
private String subjectName;
|
|
@OneToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY)
|
@JoinColumn(name = "SUBJECT_ID",referencedColumnName="SUBJECT_ID",updatable=false,insertable=false)
|
@JsonIgnore
|
private Subject subject;
|
|
@Transient
|
private int lotteryItemCount;
|
|
public int getLotteryItemCount() {
|
return lotteryItemCount;
|
}
|
|
public boolean getEditReplayFlag() {
|
return editReplayFlag;
|
}
|
|
public void setEditReplayFlag(boolean editReplayFlag) {
|
this.editReplayFlag = editReplayFlag;
|
}
|
|
public void setLotteryItemCount(int lotteryItemCount) {
|
this.lotteryItemCount = lotteryItemCount;
|
}
|
|
public List<MediaVideo> getLstVideoVO() {
|
return lstVideoVO;
|
}
|
|
public void setLstVideoVO(List<MediaVideo> lstVideoVO) {
|
this.lstVideoVO = lstVideoVO;
|
}
|
|
public String getVideoLiveId() {
|
return videoLiveId;
|
}
|
|
public void setVideoLiveId(String videoLiveId) {
|
this.videoLiveId = videoLiveId;
|
}
|
|
public String getCreateId() {
|
return createId;
|
}
|
|
public void setCreateId(String createId) {
|
this.createId = createId;
|
}
|
|
public Date getCreateTime() {
|
return createTime;
|
}
|
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
public String getCreator() {
|
return creator;
|
}
|
|
public void setCreator(String creator) {
|
this.creator = creator;
|
}
|
|
public boolean getDeleteFlag() {
|
return deleteFlag;
|
}
|
|
public void setDeleteFlag(boolean deleteFlag) {
|
this.deleteFlag = deleteFlag;
|
}
|
|
public String getUpdateId() {
|
return updateId;
|
}
|
|
public void setUpdateId(String updateId) {
|
this.updateId = updateId;
|
}
|
|
public Date getUpdateTime() {
|
return updateTime;
|
}
|
|
public void setUpdateTime(Date updateTime) {
|
this.updateTime = updateTime;
|
}
|
|
public String getUpdator() {
|
return updator;
|
}
|
|
public void setUpdator(String updator) {
|
this.updator = updator;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
public short getStatus() {
|
return status;
|
}
|
|
public void setStatus(short status) {
|
this.status = status;
|
}
|
|
public String getAnchorId() {
|
return anchorId;
|
}
|
|
public void setAnchorId(String anchorId) {
|
this.anchorId = anchorId;
|
}
|
|
public String getAnchor() {
|
return anchor;
|
}
|
|
public void setAnchor(String anchor) {
|
this.anchor = anchor;
|
}
|
|
public String getPreviewImgUrl() {
|
return previewImgUrl;
|
}
|
|
public void setPreviewImgUrl(String previewImgUrl) {
|
this.previewImgUrl = previewImgUrl;
|
}
|
|
public String getPreviewVideoUrl() {
|
return previewVideoUrl;
|
}
|
|
public void setConsultImgUrl(String consultImgUrl) {
|
this.consultImgUrl = consultImgUrl;
|
}
|
|
public String getConsultImgUrl() {
|
return consultImgUrl;
|
}
|
|
public void setPreviewVideoUrl(String previewVideoUrl) {
|
this.previewVideoUrl = previewVideoUrl;
|
}
|
|
public Integer getOrderTimes() {
|
return orderTimes;
|
}
|
|
public void setOrderTimes(Integer orderTimes) {
|
this.orderTimes = orderTimes;
|
}
|
|
public Integer getWatchTimes() {
|
return watchTimes;
|
}
|
|
public void setWatchTimes(Integer watchTimes) {
|
this.watchTimes = watchTimes;
|
}
|
|
public String getRemark() {
|
return remark;
|
}
|
|
public void setRemark(String remark) {
|
this.remark = remark;
|
}
|
|
public Date getStartTime() {
|
return startTime;
|
}
|
|
public void setStartTime(Date startTime) {
|
this.startTime = startTime;
|
}
|
|
public Date getEndTime() {
|
return endTime;
|
}
|
|
public void setEndTime(Date endTime) {
|
this.endTime = endTime;
|
}
|
|
public boolean getOnTimeFlag() {
|
return onTimeFlag;
|
}
|
|
public void setOnTimeFlag(boolean onTimeFlag) {
|
this.onTimeFlag = onTimeFlag;
|
}
|
|
public boolean getCompleteFlag() {
|
return completeFlag;
|
}
|
|
public void setCompleteFlag(boolean completeFlag) {
|
this.completeFlag = completeFlag;
|
}
|
|
public String getTecentLiveNumber() {
|
return tecentLiveNumber;
|
}
|
|
public void setTecentLiveNumber(String tecentLiveNumber) {
|
this.tecentLiveNumber = tecentLiveNumber;
|
}
|
|
public List<SchLiveReVideo> getLiveReVideos() {
|
return liveReVideos;
|
}
|
|
public void setLiveReVideos(List<SchLiveReVideo> liveReVideos) {
|
this.liveReVideos = liveReVideos;
|
}
|
|
public List<VideoLiveChatroom> getVideoLiveChatrooms() {
|
return videoLiveChatrooms;
|
}
|
|
public void setVideoLiveChatrooms(List<VideoLiveChatroom> videoLiveChatrooms) {
|
this.videoLiveChatrooms = videoLiveChatrooms;
|
}
|
|
public Integer getWatcherLimit() {
|
return watcherLimit;
|
}
|
|
public void setWatcherLimit(Integer watcherLimit) {
|
this.watcherLimit = watcherLimit;
|
}
|
|
public String getWyLiveNumber() {
|
return wyLiveNumber;
|
}
|
|
public void setWyLiveNumber(String wyLiveNumber) {
|
this.wyLiveNumber = wyLiveNumber;
|
}
|
|
public String getPushUrl() {
|
return pushUrl;
|
}
|
|
public void setPushUrl(String pushUrl) {
|
this.pushUrl = pushUrl;
|
}
|
|
public String getHttpPullUrl() {
|
return httpPullUrl;
|
}
|
|
public void setHttpPullUrl(String httpPullUrl) {
|
this.httpPullUrl = httpPullUrl;
|
}
|
|
public String getHlsPullUrl() {
|
return hlsPullUrl;
|
}
|
|
public void setHlsPullUrl(String hlsPullUrl) {
|
this.hlsPullUrl = hlsPullUrl;
|
}
|
|
public String getRtmpPullUrl() {
|
return rtmpPullUrl;
|
}
|
|
public void setRtmpPullUrl(String rtmpPullUrl) {
|
this.rtmpPullUrl = rtmpPullUrl;
|
}
|
|
public Integer getWatchMaxTimes() {
|
return watchMaxTimes;
|
}
|
|
public void setWatchMaxTimes(Integer watchMaxTimes) {
|
this.watchMaxTimes = watchMaxTimes;
|
}
|
|
public Integer getReviewTimes() {
|
return reviewTimes;
|
}
|
|
public void setReviewTimes(Integer reviewTimes) {
|
this.reviewTimes = reviewTimes;
|
}
|
|
public String getPermission() {
|
return permission;
|
}
|
|
public void setPermission(String permission) {
|
this.permission = permission;
|
}
|
|
public String getDefinition() {
|
return definition;
|
}
|
|
public void setDefinition(String definition) {
|
this.definition = definition;
|
}
|
|
public Integer getExpectedTimes() {
|
return expectedTimes;
|
}
|
|
public void setExpectedTimes(Integer expectedTimes) {
|
this.expectedTimes = expectedTimes;
|
}
|
|
public BigInteger getShareTimes() {
|
return shareTimes;
|
}
|
|
public void setShareTimes(BigInteger shareTimes) {
|
this.shareTimes = shareTimes;
|
}
|
|
public BigInteger getPlayTimes() {
|
return playTimes;
|
}
|
|
public void setPlayTimes(BigInteger playTimes) {
|
this.playTimes = playTimes;
|
}
|
|
public String getAttribute() {
|
return attribute;
|
}
|
|
public void setAttribute(String attribute) {
|
this.attribute = attribute;
|
}
|
|
public long getLastRecordTime() {
|
return lastRecordTime;
|
}
|
|
public void setLastRecordTime(long lastRecordTime) {
|
this.lastRecordTime = lastRecordTime;
|
}
|
|
public String getMeetingId() {
|
return meetingId;
|
}
|
|
public void setMeetingId(String meetingId) {
|
this.meetingId = meetingId;
|
}
|
|
public String getMeetingPwd() {
|
return meetingPwd;
|
}
|
|
public void setMeetingPwd(String meetingPwd) {
|
this.meetingPwd = meetingPwd;
|
}
|
|
public String getSubjectId() {
|
return subjectId;
|
}
|
|
public void setSubjectId(String subjectId) {
|
this.subjectId = subjectId;
|
}
|
|
public String getSubjectName() {
|
return subjectName;
|
}
|
|
public void setSubjectName(String subjectName) {
|
this.subjectName = subjectName;
|
}
|
|
public List<ClsClass> getClasses() {
|
return classes;
|
}
|
|
public void setClasses(List<ClsClass> classes) {
|
this.classes = classes;
|
}
|
|
public Integer getPraiseTimes() {
|
return praiseTimes;
|
}
|
|
public void setPraiseTimes(Integer praiseTimes) {
|
this.praiseTimes = praiseTimes;
|
}
|
|
public Subject getSubject() {
|
return subject;
|
}
|
|
public void setSubject(Subject subject) {
|
this.subject = subject;
|
}
|
|
}
|