import { Entity, Property, OneToMany, Collection } from '@mikro-orm/core'; import { BaseEntity } from '../_BaseEntity'; import { TenantApp } from './TenantApps'; @Entity() export class Tenant extends BaseEntity { @Property() name!: string; @OneToMany(() => TenantApp, (tenantApp) => tenantApp.tenant) tenantApps = new Collection(this); }