no message
This commit is contained in:
parent
317920ad0d
commit
b2b97aecf0
6 changed files with 225 additions and 6 deletions
89
src/entities/CommandRecive.ts
Normal file
89
src/entities/CommandRecive.ts
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
import { Entity, Column, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Command } from "./Command";
|
||||
import { Profile } from "./Profile";
|
||||
|
||||
@Entity("commandRecive")
|
||||
export class CommandRecive extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เลขประจำตัวประชาชน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
citizenId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "คำนำหน้า",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
prefix: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อ",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
fristName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "สกุล",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
lastName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ตำแหน่ง",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
position: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หน่วยงาน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
org: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ลำดับแสดงผล",
|
||||
default: null,
|
||||
})
|
||||
order: number;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง command",
|
||||
})
|
||||
commandId: string;
|
||||
|
||||
@ManyToOne(() => Command, (command) => command.commandRecives)
|
||||
@JoinColumn({ name: "commandId" })
|
||||
command: Command;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@ManyToOne(() => Profile, (profile) => profile.commandRecives)
|
||||
@JoinColumn({ name: "profileId" })
|
||||
profile: Profile;
|
||||
}
|
||||
|
||||
export class CreateCommandRecive {
|
||||
@Column()
|
||||
name: string;
|
||||
}
|
||||
|
||||
// export type UpdateCommandRecive = Partial<CreateCommandRecive>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue