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.
36 lines (28 loc) • 699 B
text/typescript
import {
Column,
CreateDateColumn,
Entity,
JoinColumn,
ManyToOne,
OneToMany,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from "typeorm";
import { DepartmentData } from "./department.data";
import { UserData } from "./user.data";
({ name: "municipality" })
export class MunicipalityData {
()
id: number;
()
name: string;
()
createdAt: Date;
()
updatedAt: Date;
(() => DepartmentData, (department) => department.municipalities)
({ name: "departmentId" })
department: DepartmentData;
(() => UserData, (user) => user.municipality)
users: UserData[];
}