mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 17:25:11 +03:00
25 lines
558 B
TypeScript
25 lines
558 B
TypeScript
import { DatabaseAction, EntityType } from 'src/enum';
|
|
import { Column, CreateDateColumn, Index, PrimaryColumn, Table } from 'src/sql-tools';
|
|
|
|
@Table('audit')
|
|
@Index({ name: 'IDX_ownerId_createdAt', columns: ['ownerId', 'createdAt'] })
|
|
export class AuditTable {
|
|
@PrimaryColumn({ type: 'serial', synchronize: false })
|
|
id!: number;
|
|
|
|
@Column()
|
|
entityType!: EntityType;
|
|
|
|
@Column({ type: 'uuid' })
|
|
entityId!: string;
|
|
|
|
@Column()
|
|
action!: DatabaseAction;
|
|
|
|
@Column({ type: 'uuid' })
|
|
ownerId!: string;
|
|
|
|
@CreateDateColumn()
|
|
createdAt!: Date;
|
|
}
|