import { IncrementIdEntity } from 'src/common/entities/increment-id.entity';
import { Column, Entity } from 'typeorm';

/**
 * 在线教学
 */
@Entity()
export class LiveTeaching extends IncrementIdEntity {
  @Column({ type: 'longtext', comment: '直播名称' })
  title: string;

  @Column({ name: 'start_time', comment: '开始时间' })
  startTime: Date;

  @Column({
    name: 'actual_start_time',
    comment: '真实开始时间',
    nullable: true,
    default: null,
  })
  actualStartTime: Date;

  @Column({
    name: 'actual_end_time',
    comment: '真实结束时间',
    nullable: true,
    default: null,
  })
  actualEndTime: Date;

  @Column({ comment: '直播时长', default: 0 })
  duration: number;

  @Column({ comment: '直播分类' })
  classify: number;

  @Column({ comment: '直播简介', type: 'longtext' })
  explain: string;

  @Column({ comment: '直播封面', type: 'longtext' })
  cover: string;

  @Column({ comment: '直播状态 0/1/2 未开始/进行中/已结束', default: 0 })
  status: number;

  @Column({ name: 'warm_up_picture', comment: '暖场图片', type: 'longtext' })
  warmUpPicture: string;

  @Column({ name: 'warm_up_musice', comment: '暖场音乐', type: 'longtext' })
  warmUpMusice: string;

  @Column({ comment: '是否回放0/1' })
  playback: number;

  @Column({
    name: 'playback_deadline',
    comment: '回放期限',
    nullable: true,
    default: null,
  })
  playbackDeadline: Date;

  @Column({ name: 'open_quiz', comment: '0/1开启课程问答' })
  openQuiz: number;

  @Column({ type: 'longtext', comment: '讲师' })
  lecturer: string;

  @Column({ name: 'open_discussion', comment: '是否开启讨论', default: 0 })
  openDiscussion: number;

  @Column({
    name: 'open_self_evaluation',
    default: 0,
    comment: '0/1开启学员自评',
  })
  openSelfEvaluation: number;

  @Column({ name: 'open_eval', comment: '是否开启评价', default: 0 })
  openEval: number;

  @Column({
    name: 'txt_or_grade_evealute',
    comment: '文本或维度评价',
    default: 0,
  })
  txtOrGradeEvealute: number;

  @Column({
    type: 'longtext',
    name: 'text_evaluate_title',
    comment: '文本评价标题',
  })
  textEvaluateTitle: string;
}
