chore: add ticket module and tickets entity
This commit is contained in:
@@ -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[];
|
||||
}
|
||||
Reference in New Issue
Block a user