import { CreateDateColumn , PrimaryGeneratedColumn , UpdateDateColumn } from 'typeorm' ; import { DeepPartial , ID } from '../common/shared-types' ; description docsCategory export abstract class BaseEntity { protected constructor ( input ? ) { if ( input ) { for ( const [ key , value ] of Object . entries ( input ) ) { ( this as any ) [ key ] = value ; } } } @ PrimaryGeneratedColumn ( 'increment' ) id : ID ; @ CreateDateColumn ( ) createdAt ? : Date ; @ UpdateDateColumn ( ) updatedAt ? : Date ; }