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

/**
 * 学员讨论
 */
@Entity()
export class ResourceDiscussion extends IncrementIdEntity {
  @Column({
    name: 'type',
    comment: '公共评论类型',
    nullable: false,
  })
  type: string;

  @Column({
    name: 'reply_id',
    comment: '所回复的评论id',
    nullable: true,
    default: null,
  })
  replyId: number;

  @Column({
    type: 'longtext',
    name: 'reply_user_id',
    comment: '所回复评论的用户ID',
    nullable: true,
    default: null,
  })
  replyUserId: string;

  @Column({
    name: 'root_dis',
    comment: '所回复评论的根节点id',
    nullable: true,
    default: null,
  })
  rootDis: number;

  @Column({ type: 'longtext', comment: '的评论内容' })
  content: string;
}
