author BounceCode, Inc.
 *  packageDocumentation import { UserEntity } from '../../User/entities/User.entity' ; import { Entity , PrimaryGeneratedColumn , Column , BaseEntity , VersionColumn , ManyToOne , CreateDateColumn , UpdateDateColumn , DeleteDateColumn , Index , } from 'typeorm' ; author BounceCode, Inc.
  @ Entity ( ) export class CommentEntity extends BaseEntity { @ PrimaryGeneratedColumn ( ) id : number ; @ Column ( ) @ Index ( ) postId : string ; @ Column ( { nullable : true } ) parentId : number ; @ Column ( ) text : string ; @ Column ( 'json' ) payload : any ; @ ManyToOne ( ( ) => UserEntity , user => user . chatMessages ) user : UserEntity ; @ Column ( { default : 0 } ) like : number ; @ Column ( { default : 0 } ) unlike : number ; @ VersionColumn ( ) version : number ; @ CreateDateColumn ( ) createdDate : Date ; @ UpdateDateColumn ( ) updatedDate : Date ; @ DeleteDateColumn ( ) deletedDate : Date ; }