18 lines
321 B
TypeScript
18 lines
321 B
TypeScript
|
import {
|
||
|
CreateDateColumn,
|
||
|
UpdateDateColumn,
|
||
|
PrimaryGeneratedColumn,
|
||
|
BaseEntity,
|
||
|
} from 'typeorm';
|
||
|
|
||
|
export default abstract class Model extends BaseEntity {
|
||
|
@PrimaryGeneratedColumn('uuid')
|
||
|
id: string;
|
||
|
|
||
|
@CreateDateColumn()
|
||
|
created_at: Date;
|
||
|
|
||
|
@UpdateDateColumn()
|
||
|
updated_at: Date;
|
||
|
}
|