4
0
mirror of https://github.com/apgzs/cool-admin-api.git synced 2025-04-06 03:58:06 +08:00
2019-09-28 16:12:42 +08:00

15 lines
368 B
TypeScript

import { PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, Index } from 'typeorm';
// 实体类基类
export abstract class BaseEntity {
// ID
@PrimaryGeneratedColumn({ type: 'bigint' })
id: number;
// 创建时间
@Index()
@CreateDateColumn()
createTime: Date;
// 更新时间
@UpdateDateColumn()
updateTime: Date;
}