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[]; }