echadospalante-core
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.
75 lines (60 loc) • 1.63 kB
text/typescript
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
ManyToOne,
OneToMany,
OneToOne,
ManyToMany,
JoinColumn,
} from "typeorm";
import { EventLocationData } from "./event-location.data";
import { EventDonationData } from "./event-donation.data";
import { EventCategoryData } from "./event-category.data";
import { EventContactData } from "./event-contact.data";
import { VentureData } from "./venture.data";
({ name: "venture_event" })
export class VentureEventData {
("uuid")
id: string;
()
title: string;
()
description: string;
()
coverPhoto: string;
({ type: "varchar", unique: true })
slug: string;
(() => VentureData, (venture) => venture.events)
({ name: "ventureId" })
venture?: VentureData;
({ name: "locationId" })
(() => EventLocationData, (eventLocation) => eventLocation.event, {
cascade: true,
eager: true,
})
location: EventLocationData;
({ name: "contactId" })
(() => EventContactData, (eventLocation) => eventLocation.event, {
cascade: true,
})
contact: EventContactData;
(
() => EventCategoryData,
(eventCategory) => eventCategory.events,
{ eager: true }
)
categories: EventCategoryData[];
(() => EventDonationData, (eventDonation) => eventDonation.event)
donations: EventDonationData[];
()
startDate: Date;
()
endDate: Date;
()
createdAt: Date;
()
updatedAt: Date;
}