oneuptime/Common/Models/BaseModel.ts
2022-04-27 20:54:34 +01:00

18 lines
428 B
TypeScript

import { DeleteDateColumn, UpdateDateColumn, CreateDateColumn, VersionColumn, PrimaryGeneratedColumn, BaseEntity } from 'typeorm';
export default class BaseModel extends BaseEntity {
@PrimaryGeneratedColumn("uuid")
id!: string;
@CreateDateColumn()
createdAt!: Date;
@UpdateDateColumn()
updatedAt!: Date;
@DeleteDateColumn()
deletedAt?: Date;
@VersionColumn()
version!: number;
}