🚧 Permissions
This commit is contained in:
parent
82ca8f48dc
commit
1d57264922
37
src/models/Permission.ts
Normal file
37
src/models/Permission.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import { PrimaryGeneratedColumn, Column, OneToMany, Entity } from "typeorm";
|
||||||
|
import {
|
||||||
|
IsInt,
|
||||||
|
IsNotEmpty,
|
||||||
|
IsOptional,
|
||||||
|
IsString,
|
||||||
|
} from "class-validator";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the UserGroup interface.
|
||||||
|
*/
|
||||||
|
@Entity()
|
||||||
|
export abstract class UserGroup {
|
||||||
|
/**
|
||||||
|
* Autogenerated unique id (primary key).
|
||||||
|
*/
|
||||||
|
@PrimaryGeneratedColumn()
|
||||||
|
@IsOptional()
|
||||||
|
@IsInt()
|
||||||
|
id: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The target
|
||||||
|
*/
|
||||||
|
@Column()
|
||||||
|
@IsNotEmpty()
|
||||||
|
@IsString()
|
||||||
|
target: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The action type
|
||||||
|
*/
|
||||||
|
@Column()
|
||||||
|
@IsNotEmpty()
|
||||||
|
@IsString()
|
||||||
|
action: string;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user