diff --git a/server/src/infra/entities/smart-album-policy.entity.ts b/server/src/infra/entities/smart-album-policy.entity.ts index abe347ebcc..70faaf83f0 100644 --- a/server/src/infra/entities/smart-album-policy.entity.ts +++ b/server/src/infra/entities/smart-album-policy.entity.ts @@ -1,5 +1,6 @@ import { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'; import { AlbumEntity } from './album.entity'; +import { UserEntity } from './user.entity'; @Entity('smart-album-policies') export class SmartAlbumPolicyEntity { @@ -12,6 +13,12 @@ export class SmartAlbumPolicyEntity { @Column() value!: string; + @Column() + ownerId!: string; + + @ManyToOne(() => UserEntity) + user!: UserEntity; + @Column() albumId!: string; @@ -21,6 +28,6 @@ export class SmartAlbumPolicyEntity { } export enum PolicyType { - PERSON = 'PERSON', - LOCATION = 'LOCATION', + PERSON = 'PERSON', // Value is a personId + LOCATION = 'LOCATION', // Value is the location in text }