chore: add ticket module and tickets entity

This commit is contained in:
mahyargdz
2025-01-22 17:03:46 +03:30
parent c48ec70638
commit e3762c1eba
16 changed files with 166 additions and 27 deletions
@@ -0,0 +1,16 @@
import { Column, Entity, OneToMany } from "typeorm";
import { Ticket } from "./ticket.entity";
import { BaseEntity } from "../../../common/entities/base.entity";
@Entity()
export class TicketCategory extends BaseEntity {
@Column({ type: "varchar", length: 150, nullable: false, unique: true })
name: string;
@Column({ type: "text", nullable: true })
description: string;
@OneToMany(() => Ticket, (ticket) => ticket.category)
tickets: Ticket[];
}