update
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToMany, JoinTable } from "typeorm";
|
||||||
|
import { Service } from "./service";
|
||||||
|
|
||||||
@Entity("registration_fee")
|
@Entity("registration_fee")
|
||||||
export class RegistrationFee {
|
export class RegistrationFee {
|
||||||
@ -10,7 +11,15 @@ export class RegistrationFee {
|
|||||||
nullable: true,
|
nullable: true,
|
||||||
array: true,
|
array: true,
|
||||||
})
|
})
|
||||||
service: string[];
|
service: string[]; // ← kembalikan kolom original
|
||||||
|
|
||||||
|
@ManyToMany(() => Service)
|
||||||
|
@JoinTable({
|
||||||
|
name: "registration_fee_services",
|
||||||
|
joinColumn: { name: "registration_fee_id", referencedColumnName: "id" },
|
||||||
|
inverseJoinColumn: { name: "service_id", referencedColumnName: "id" },
|
||||||
|
})
|
||||||
|
services: Service[]; // ← tetap ada untuk join
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
@ -36,4 +45,4 @@ export class RegistrationFee {
|
|||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
deleted_by: string;
|
deleted_by: string;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user