echadospalante-domain
Version:
This package contains the core of the echadospalante project, it contains the domain entities, helpers, and other utilities that are shared between the different services.
43 lines (35 loc) • 866 B
text/typescript
// event-category.entity.ts
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
ManyToMany,
JoinTable,
} from "typeorm";
import { VentureEventData } from "./venture-event.data";
({
name: "event_category",
})
export class EventCategoryData {
("uuid")
id: string;
({ unique: true })
name: string;
({ unique: true })
slug: string;
()
description: string;
()
createdAt: Date;
()
updatedAt: Date;
(() => VentureEventData, (ventureEvent) => ventureEvent.categories)
({
name: "x_event_event_category",
joinColumn: { name: "categoryId", referencedColumnName: "id" },
inverseJoinColumn: { name: "eventId", referencedColumnName: "id" },
})
events: VentureEventData[];
}