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.
42 lines (35 loc) • 890 B
text/typescript
import {
Entity,
PrimaryGeneratedColumn,
Column,
OneToOne,
Point,
Index,
ManyToOne,
JoinColumn,
} from "typeorm";
import { VentureEventData } from "./venture-event.data";
import { MunicipalityData } from "./municipality.data";
({ name: "event_location" })
export class EventLocationData {
("uuid")
id: string;
("geometry", {
spatialFeatureType: "Point",
srid: 4326,
nullable: true,
})
({ spatial: true })
public location?: Point;
(
() => MunicipalityData,
(municipality) => municipality.eventLocations,
{ eager: true, nullable: false }
)
({ name: "municipalityId" })
municipality: MunicipalityData;
({ nullable: true })
description?: string;
(() => VentureEventData, (ventureEvent) => ventureEvent.location)
event?: VentureEventData;
}