mirror of
https://github.com/immich-app/immich.git
synced 2026-05-26 17:02:36 -04:00
a07d7b0c82
Co-authored-by: Jason Rasmussen <jason@rasm.me>
19 lines
656 B
TypeScript
19 lines
656 B
TypeScript
import { Column, CreateDateColumn, ForeignKeyColumn, Generated, Table, Timestamp } from '@immich/sql-tools';
|
|
import { PrimaryGeneratedUuidV7Column } from 'src/decorators';
|
|
import { MemoryTable } from 'src/schema/tables/memory.table';
|
|
|
|
@Table('memory_asset_audit')
|
|
export class MemoryAssetAuditTable {
|
|
@PrimaryGeneratedUuidV7Column()
|
|
id!: Generated<string>;
|
|
|
|
@ForeignKeyColumn(() => MemoryTable, { type: 'uuid', onDelete: 'CASCADE', onUpdate: 'CASCADE' })
|
|
memoryId!: string;
|
|
|
|
@Column({ type: 'uuid', index: true })
|
|
assetId!: string;
|
|
|
|
@CreateDateColumn({ default: () => 'clock_timestamp()', index: true })
|
|
deletedAt!: Generated<Timestamp>;
|
|
}
|