Cleaned up relation types

ref #6
This commit is contained in:
Nicolai Ort 2020-12-18 14:29:31 +01:00
parent 476afc6a99
commit eb9473e230
1 changed files with 3 additions and 9 deletions

View File

@ -22,24 +22,18 @@ export abstract class Permission {
* The permissions principal
*/
@ManyToOne(() => Principal, principal => principal.permissions)
principal: Principal[]
principal: Principal;
/**
* The target
*/
@Column({
type: 'simple-enum',
enum: PermissionTarget
})
@Column({ type: 'varchar' })
@IsNotEmpty()
target: PermissionTarget;
/**
* The action type
*/
@Column({
type: 'simple-enum',
enum: PermissionAction
})
@Column({ type: 'varchar' })
action: PermissionAction;
}