postgres init

This commit is contained in:
Ben Wilson
2023-12-04 00:34:33 -05:00
parent f7303d73af
commit 39c4c033e2
11 changed files with 305 additions and 85 deletions
+3 -5
View File
@@ -1,14 +1,12 @@
import { CreateDateColumn, DeleteDateColumn, UpdateDateColumn } from 'typeorm';
import { DateTimeTransformer } from './DateTimeTransformer';
export abstract class TrackedEntity {
@DeleteDateColumn({ nullable: true, type: 'datetime', transformer: new DateTimeTransformer() })
@DeleteDateColumn({ nullable: true, type: 'timestamp' })
public deletedAt?: Date;
@CreateDateColumn({ type: 'datetime', transformer: new DateTimeTransformer() })
@CreateDateColumn({ type: 'timestamp' })
public createdAt?: Date
@UpdateDateColumn({ type: 'datetime', transformer: new DateTimeTransformer() })
@UpdateDateColumn({ type: 'timestamp' })
public updatedAt?: Date
}