13 lines
367 B
TypeScript
13 lines
367 B
TypeScript
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<TenantApp>(this);
|
|
}
|