@sourceloop/ctrl-plane-tenant-management-service
Version:
Tenant Management microservice for SaaS control plane
48 lines (42 loc) • 971 B
text/typescript
import {model, property, belongsTo, AnyObject} from '@loopback/repository';
import {UserModifiableEntity} from '@sourceloop/core';
import {Tenant} from './tenant.model';
({
name: 'tenant_mgmt_configs',
description:
'tenant_mgmt_configs to save any tenant specific data related to idP',
})
export class TenantMgmtConfig 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: AnyObject;
(
() => 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<TenantMgmtConfig>) {
super(data);
}
}