UNPKG

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.

31 lines (25 loc) 596 B
import { Entity, PrimaryGeneratedColumn, Column, OneToOne, Point, Index, } from "typeorm"; import { VentureEventData } from "./venture-event.data"; @Entity({ name: "event_location" }) export class EventLocationData { @PrimaryGeneratedColumn("uuid") id: string; @Column("geometry", { spatialFeatureType: "Point", srid: 4326, nullable: true, }) @Index({ spatial: true }) public location?: Point; @Column({ nullable: true }) description?: string; @OneToOne(() => VentureEventData, (ventureEvent) => ventureEvent.location) event?: VentureEventData; }