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

@Entity()
export class Train extends IncrementIdEntity {
  @Column({
    comment:
      '训练名称存储到数据库时自动增加时间前缀如：yyyy-MM-dd hh:mm-训练名称',
  })
  name: string;

  @Column({ comment: '训练类型' })
  type: number;
  @Column({ comment: '训练科目' })
  subject: number;

  @Column({ comment: '训练描述', nullable: true })
  comment: string;
  @Column({ comment: '开启引导', default: 0 })
  guide: number;

  @Column({ comment: '训练时长', type: 'bigint', default: 0 })
  duration: number;

  @Column({
    comment: '评判规则',
    type: 'longtext',
    nullable: true,
  })
  rule: string;

  @Column({
    comment: '训练状态 0-准备 1-进行中  2-暂停中 3-已结束',
    default: 0,
  })
  status: number;
}
