no message
This commit is contained in:
parent
ad97270752
commit
3ea2c7c3b0
9 changed files with 420 additions and 35 deletions
79
src/entities/StateUserComment.ts
Normal file
79
src/entities/StateUserComment.ts
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { State } from "./State";
|
||||
import { Profile } from "./Profile";
|
||||
|
||||
@Entity("stateUserComment")
|
||||
export class StateUserComment extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เลือกรับทราบ",
|
||||
default: null,
|
||||
})
|
||||
isAccept: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เลือกพิจารณา",
|
||||
default: null,
|
||||
})
|
||||
isApprove: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "แสดงความคิดเห็น",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
reason: string;
|
||||
|
||||
@Column({
|
||||
comment: "เลือกรับทราบ",
|
||||
default: false,
|
||||
})
|
||||
isAcceptSetting: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "เลือกพิจารณา",
|
||||
default: false,
|
||||
})
|
||||
isApproveSetting: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "แสดงความคิดเห็น",
|
||||
default: false,
|
||||
})
|
||||
isReasonSetting: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ลำดับ",
|
||||
default: null,
|
||||
})
|
||||
order: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง state",
|
||||
default: null,
|
||||
})
|
||||
stateId: string;
|
||||
|
||||
@ManyToOne(() => State, (state) => state.stateUserComments)
|
||||
@JoinColumn({ name: "stateId" })
|
||||
state: State;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
||||
type: "uuid",
|
||||
default: null,
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@ManyToOne(() => Profile, (profile) => profile.stateUserComments)
|
||||
@JoinColumn({ name: "profileId" })
|
||||
profile: Profile;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue