add: add modules entity

This commit is contained in:
ilham
2021-12-02 22:55:15 +07:00
parent 770231744d
commit 288a6e5b69
13 changed files with 352 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import {
Entity,
Column,
PrimaryGeneratedColumn,
UpdateDateColumn,
DeleteDateColumn,
VersionColumn,
CreateDateColumn,
} from 'typeorm';
@Entity()
export class BaseModel {
@PrimaryGeneratedColumn('uuid')
id: string;
@CreateDateColumn({
type: 'timestamp with time zone',
nullable: false,
})
createdAt: Date;
@UpdateDateColumn({
type: 'timestamp with time zone',
nullable: false,
})
updatedAt: Date;
@DeleteDateColumn({
type: 'timestamp with time zone',
nullable: true,
})
deletedAt: Date;
@VersionColumn()
version: number;
}