เพิ่มฟิลด์
This commit is contained in:
parent
4cccf6f685
commit
693afa4e5f
4 changed files with 18 additions and 3 deletions
|
|
@ -339,7 +339,7 @@ export class ChangePositionController extends Controller {
|
|||
profileChangePos.posMasterNoOld = body.posMasterNoOld;
|
||||
profileChangePos.positionTypeOld = body.positionTypeOld;
|
||||
profileChangePos.positionLevelOld = body.positionLevelOld;
|
||||
profileChangePos.positionNumberOld = body.positionNumberOld;
|
||||
profileChangePos.organizationPositionOld = body.organizationPositionOld;
|
||||
profileChangePos.amountOld = body.amountOld;
|
||||
profileChangePos.reason = body.reason? String(body.reason) : "";
|
||||
profileChangePos.dateCurrent = body.dateCurrent;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Entity, Column, OneToMany } from "typeorm";
|
||||
import { Entity, Column, OneToMany, OneToOne } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { AuthRoleAttr } from "./AuthRoleAttr";
|
||||
import { PosMaster } from "./PosMaster";
|
||||
|
||||
@Entity("authRole")
|
||||
export class AuthRole extends EntityBase {
|
||||
|
|
@ -22,6 +23,9 @@ export class AuthRole extends EntityBase {
|
|||
|
||||
@OneToMany(() => AuthRoleAttr, (authRoleAttr) => authRoleAttr.authRoleAttrForRole)
|
||||
authRoles: AuthRoleAttr[];
|
||||
|
||||
@OneToOne(() => PosMaster, (posMaster) => posMaster.authRole)
|
||||
posMaster: PosMaster;
|
||||
}
|
||||
|
||||
export class CreateAuthRole {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { OrgChild2 } from "./OrgChild2";
|
|||
import { OrgChild3 } from "./OrgChild3";
|
||||
import { OrgChild4 } from "./OrgChild4";
|
||||
import { Profile } from "./Profile";
|
||||
import { AuthRole } from "./AuthRole";
|
||||
|
||||
enum PosMasterLine {
|
||||
MAIN = "MAIN",
|
||||
|
|
@ -170,6 +171,16 @@ export class PosMaster extends EntityBase {
|
|||
})
|
||||
orgRevisionId: string; //fk
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง authRole",
|
||||
})
|
||||
authRoleId: string;
|
||||
|
||||
@OneToOne(() => AuthRole, (authRole) => authRole.posMaster)
|
||||
@JoinColumn({ name: "authRoleId" })
|
||||
authRole: AuthRole;
|
||||
|
||||
@ManyToOne(() => OrgRevision, (orgRevision) => orgRevision.posMasters)
|
||||
@JoinColumn({ name: "orgRevisionId" })
|
||||
orgRevision: OrgRevision;
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ export type UpdateProfileChangePosition = {
|
|||
posMasterNoOld: number;
|
||||
positionTypeOld: string;
|
||||
positionLevelOld: string;
|
||||
positionNumberOld: string;
|
||||
organizationPositionOld: string;
|
||||
amountOld: number;
|
||||
dateCurrent : Date;
|
||||
reason: string | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue