This commit is contained in:
Bright 2024-06-13 14:41:47 +07:00
parent a7d13ac00b
commit 18510b1419
3 changed files with 32 additions and 1 deletions

View file

@ -2,6 +2,7 @@ import { Entity, Column, OneToMany, OneToOne } from "typeorm";
import { EntityBase } from "./base/Base";
import { AuthRoleAttr } from "./AuthRoleAttr";
import { PosMaster } from "./PosMaster";
import { EmployeePosMaster } from "../entities/EmployeePosMaster";
@Entity("authRole")
export class AuthRole extends EntityBase {
@ -26,6 +27,9 @@ export class AuthRole extends EntityBase {
@OneToOne(() => PosMaster, (posMaster) => posMaster.authRole)
posMaster: PosMaster;
@OneToOne(() => EmployeePosMaster, (posMasters) => posMasters.authRole)
posMasters: EmployeePosMaster;
}
export class CreateAuthRole {
@ -37,3 +41,11 @@ export class CreateAuthRole {
}
export type UpdateAuthRole = Partial<CreateAuthRole>;
export class CreateAddAuthRole {
@Column()
authRoleId: string;
@Column()
posMasterId: string;
}