Entity profileSalary
This commit is contained in:
parent
d5e318f8dc
commit
e147412ea4
3 changed files with 102 additions and 0 deletions
82
src/entities/ProfileSalary.ts
Normal file
82
src/entities/ProfileSalary.ts
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
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;
|
||||
|
||||
// }
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue