เพิ่มฟิววินัย
This commit is contained in:
parent
07c310ae26
commit
c41b0f008a
4 changed files with 44 additions and 5 deletions
25
src/entities/ProfileDiscipline.ts
Normal file
25
src/entities/ProfileDiscipline.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Profile } from "./Profile";
|
||||
|
||||
@Entity("profileDiscipline")
|
||||
export class ProfileDiscipline extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "วันที่",
|
||||
default: null,
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "ไอดีโปรไฟล์",
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@ManyToOne(() => Profile, (profile) => profile.profileDiscipline)
|
||||
@JoinColumn({ name: "profileId" })
|
||||
profile: Profile;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue