mirror of
https://github.com/immich-app/immich.git
synced 2026-05-30 18:55:19 -04:00
entity
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user