This commit is contained in:
Alex Tran 2023-08-10 13:42:00 -05:00
parent d92dbbe655
commit 5168278215

View file

@ -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
}