派生自 projectDept/qhighschool

胡仁荣
2023-03-29 a666398b496513f1fe56a44195247c254a861656
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
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;
 
    /**  第三方直播入口 */
    @Column(name="COURSE_ID", length=32)
    private int courseId;
    
    @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 int getCourseId() {
        return courseId;
    }
 
    public void setCourseId(int courseId) {
        this.courseId = courseId;
    }
 
    public void setSubject(Subject subject) {
        this.subject = subject;
    }
 
    
}