update
This commit is contained in:
@ -1,9 +1,8 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from "typeorm";
|
||||
|
||||
import { Status } from "../../types/status";
|
||||
import { HrmsFaculty } from "./hrms_faculty";
|
||||
import { HrmsEmployee } from "./hrms_employee";
|
||||
import { HrmsTrainingParticipant } from "./hrms_training_participant";
|
||||
|
||||
@Entity("hrms_trainings")
|
||||
export class HrmsTraining {
|
||||
@ -38,9 +37,6 @@ export class HrmsTraining {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@OneToMany(() => HrmsTrainingParticipant, (participant) => participant.training)
|
||||
training_participant: HrmsTrainingParticipant[];
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -10,7 +10,7 @@ export class HrmsTrainingParticipant {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => HrmsTraining, (training) => training.training_participant, { onDelete: "NO ACTION" })
|
||||
@ManyToOne(() => HrmsTraining, { onDelete: "NO ACTION", nullable: false })
|
||||
@JoinColumn()
|
||||
training: HrmsTraining;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user