import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

/**
 * 课程课件
 */
@Entity()
export class CourseSectionCourseware {
  @PrimaryGeneratedColumn('increment')
  id: number;

  @Column({ name: 'course_id', comment: '所属课程ID' })
  courseId: number;

  @Column({ name: 'section_id', comment: '所属章节ID' })
  sectionId: number;

  @Column({ comment: '课件的存储信息' })
  fileId: number;

  @Column({ type: 'longtext', comment: '课件名称' })
  name: string;

  @Column({ name: 'study_time', comment: '学习时长10为10分钟' })
  studyTime: number;

  @Column({ comment: '学习占比number%' })
  percentage: number;

  @Column({ name: 'can_speed', comment: '0/1' })
  canSpeed: number;

  @Column({ name: 'serial_number', comment: '章节在当前课程中的序号' })
  serialNumber: number;

  @Column({
    default: 0,
    name: 'del_flag',
    comment: '是否删除：0否/1是',
  })
  delFlag: number;
}
