chore: add business logic

This commit is contained in:
Mahyargdz
2025-05-18 10:19:16 +03:30
parent 1bc8b23452
commit b5c90e8c2e
12 changed files with 119 additions and 187 deletions
@@ -1,4 +1,4 @@
import { Column, Entity, ManyToOne } from "typeorm";
import { Column, Entity, JoinTable, ManyToMany, ManyToOne } from "typeorm";
import { SubscriptionPlan } from "./subscription.entity";
import { BaseEntity } from "../../../common/entities/base.entity";
@@ -28,6 +28,13 @@ export class UserSubscription extends BaseEntity {
@Column({ type: "text", nullable: false })
description: string;
@Column({ type: "varchar", length: 250, unique: true, nullable: true })
slug: string;
@Column({ type: "enum", enum: SubscriptionStatus, default: SubscriptionStatus.INACTIVE })
status: SubscriptionStatus;
@ManyToMany(() => User)
@JoinTable()
staff: User[];
}