@sourceloop/ctrl-plane-tenant-management-service
Version:
Tenant Management microservice for SaaS control plane
47 lines (41 loc) • 935 B
text/typescript
import {belongsTo, model, property} from '@loopback/repository';
import {UserModifiableEntity} from '@sourceloop/core';
import {Tenant} from './tenant.model';
({
name: 'tenant_configs',
description: 'tenant_configs to save any tenant specific data related to idP',
})
export class TenantConfig extends UserModifiableEntity {
({
type: 'string',
id: true,
generated: true,
})
id: string;
({
type: 'string',
required: true,
name: 'config_key',
})
configKey: string;
({
type: 'object',
required: true,
name: 'config_value',
})
configValue: object;
(
() => Tenant,
{keyTo: 'id'},
{
type: 'string',
name: 'tenant_id',
description: 'id of the tenant this invoice is generated for',
required: true,
},
)
tenantId: string;
constructor(data?: Partial<TenantConfig>) {
super(data);
}
}