entity
This commit is contained in:
parent
d92dbbe655
commit
5168278215
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue