83 lines
1.5 KiB
TypeScript
83 lines
1.5 KiB
TypeScript
|
|
import { Entity, Column, OneToMany, OneToOne, JoinColumn, ManyToMany, ManyToOne, Double } from "typeorm";
|
||
|
|
import { EntityBase } from "./base/Base";
|
||
|
|
import { Profile } from "./Profile" ;
|
||
|
|
|
||
|
|
@Entity("profileSalary")
|
||
|
|
export class ProfileSalary extends EntityBase {
|
||
|
|
@Column({
|
||
|
|
comment: "วันที่",
|
||
|
|
type: "datetime",
|
||
|
|
nullable: true,
|
||
|
|
})
|
||
|
|
date: Date;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
comment: "เงินเดือนฐาน",
|
||
|
|
default: 0,
|
||
|
|
nullable: true,
|
||
|
|
type: "double"
|
||
|
|
})
|
||
|
|
amount: Double;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
comment: "เงินประจำตำแหน่ง",
|
||
|
|
default: 0,
|
||
|
|
nullable: true,
|
||
|
|
type: "double"
|
||
|
|
})
|
||
|
|
positionSalaryAmount: Double;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
comment: "เงินค่าตอบแทนรายเดือน",
|
||
|
|
default: 0,
|
||
|
|
nullable: true,
|
||
|
|
type: "double"
|
||
|
|
})
|
||
|
|
mouthSalaryAmount: Double;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
length: 40,
|
||
|
|
comment: "ไอดีโปรไฟล์",
|
||
|
|
})
|
||
|
|
profileId: string;
|
||
|
|
|
||
|
|
@ManyToOne(() => Profile, (profile) => profile.profileSalary)
|
||
|
|
@JoinColumn({ name: "profileId" })
|
||
|
|
profile: Profile;
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
// export class CreateProfileSalary {
|
||
|
|
|
||
|
|
// @Column()
|
||
|
|
// date: Date;
|
||
|
|
|
||
|
|
// @Column()
|
||
|
|
// amount: Double;
|
||
|
|
|
||
|
|
// @Column()
|
||
|
|
// positionSalaryAmount: Double;
|
||
|
|
|
||
|
|
// @Column()
|
||
|
|
// mouthSalaryAmount: Double;
|
||
|
|
|
||
|
|
// }
|
||
|
|
|
||
|
|
// export class UpdateProfileSalary {
|
||
|
|
|
||
|
|
// @Column()
|
||
|
|
// date: Date;
|
||
|
|
|
||
|
|
// @Column()
|
||
|
|
// amount: Double;
|
||
|
|
|
||
|
|
// @Column()
|
||
|
|
// positionSalaryAmount: Double;
|
||
|
|
|
||
|
|
// @Column()
|
||
|
|
// mouthSalaryAmount: Double;
|
||
|
|
|
||
|
|
// }
|
||
|
|
|