chore: add invoice and subscription entities
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { Column, Entity, ManyToMany, ManyToOne, OneToMany } from "typeorm";
|
||||
import { Column, Entity, ManyToOne, OneToMany } from "typeorm";
|
||||
|
||||
import { DanakServiceCategory } from "./danak-service-category.entity";
|
||||
import { DanakServiceImage } from "./danak-service-image.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { Announcement } from "../../announcements/entities/announcement.entity";
|
||||
import { SubscriptionPlan } from "../../subscriptions/entities/subscription.entity";
|
||||
import { Ticket } from "../../tickets/entities/ticket.entity";
|
||||
import { User } from "../../users/entities/user.entity";
|
||||
import { ServicesLanguage } from "../enums/services-language.enum";
|
||||
|
||||
@Entity()
|
||||
@@ -61,6 +61,9 @@ export class DanakService extends BaseEntity {
|
||||
@OneToMany(() => Ticket, (ticket) => ticket.danakService)
|
||||
tickets: Ticket[];
|
||||
|
||||
@ManyToMany(() => User, (user) => user.danakServices)
|
||||
users: User[];
|
||||
@OneToMany(() => SubscriptionPlan, (plan) => plan.service, { cascade: true })
|
||||
subscriptionPlans: SubscriptionPlan[];
|
||||
}
|
||||
|
||||
// @ManyToMany(() => User, (user) => user.danakServices)
|
||||
// users: User[];
|
||||
|
||||
Reference in New Issue
Block a user