add entity AuthRole , AuthRoleAttr , AuthSys
This commit is contained in:
parent
aa67674fa7
commit
4beef77eb3
3 changed files with 213 additions and 0 deletions
35
src/entities/AuthRole.ts
Normal file
35
src/entities/AuthRole.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import { Entity, Column, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { AuthRoleAttr } from "./AuthRoleAttr";
|
||||
|
||||
@Entity("AuthRole")
|
||||
export class AuthRole extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อบทบาท",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
roleName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "รายละเอียด",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
roleDescription: string;
|
||||
|
||||
@OneToMany(() => AuthRoleAttr, (authRoleAttr) => authRoleAttr.authRoleAttrForRole)
|
||||
authRoles: AuthRoleAttr[];
|
||||
}
|
||||
|
||||
export class CreateAuthRole {
|
||||
@Column()
|
||||
roleName: string;
|
||||
|
||||
@Column()
|
||||
roleDescription: string;
|
||||
}
|
||||
|
||||
export type UpdateAuthRole = Partial<CreateAuthRole>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue