@@ -1,29 +1,16 @@
|
||||
import {
|
||||
IsInt,
|
||||
IsNotEmpty,
|
||||
IsOptional,
|
||||
IsString
|
||||
} from "class-validator";
|
||||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { Permission } from "./Permission";
|
||||
import { ChildEntity, Column } from "typeorm";
|
||||
import { Principal } from './Principal';
|
||||
|
||||
/**
|
||||
* Defines the UserGroup interface.
|
||||
*/
|
||||
@Entity()
|
||||
export class UserGroup {
|
||||
/**
|
||||
* Autogenerated unique id (primary key).
|
||||
*/
|
||||
@PrimaryGeneratedColumn()
|
||||
@IsInt()
|
||||
id: number;
|
||||
|
||||
/**
|
||||
* permissions
|
||||
*/
|
||||
@ManyToOne(() => Permission, permission => permission.groups, { nullable: true })
|
||||
permissions: Permission[];
|
||||
@ChildEntity()
|
||||
export class UserGroup extends Principal {
|
||||
|
||||
/**
|
||||
* The group's name
|
||||
|
||||
Reference in New Issue
Block a user