fusero-app-boilerplate/src/apps/_app/entities/tenant/_Tenant.ts
2025-04-29 07:51:17 +02:00

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);
}