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")
|
||||
export class RegistrationFee {
|
||||
@ -10,7 +11,15 @@ export class RegistrationFee {
|
||||
nullable: 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({
|
||||
nullable: false,
|
||||
|
||||
Reference in New Issue
Block a user