This commit is contained in:
Kittapath 2024-04-19 09:44:46 +07:00
parent c4a975b503
commit a9dd103ff8
16 changed files with 1484 additions and 15 deletions

24
src/entities/position.ts Normal file
View file

@ -0,0 +1,24 @@
import { Entity, Column, OneToMany, ManyToMany, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { KpiLink } from "./kpiLink";
@Entity("position")
export class Position extends EntityBase {
@Column({
nullable: true,
comment: "ชื่อตำแหน่ง",
default: null,
})
name: string;
@Column({
nullable: true,
length: 40,
comment: "ไอดีเชื่อมโยง",
})
kpiLinkId: string | null;
@ManyToOne(() => KpiLink, (kpiLink) => kpiLink.positions)
@JoinColumn({ name: "kpiLinkId" })
kpiLink: KpiLink;
}