Skip to content

Commit b5a58a8

Browse files
committed
Fix #9
1 parent 4ede6ea commit b5a58a8

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

src/models/tenant.model.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {model, property} from '@loopback/repository';
22

33
import {UserModifiableEntity} from './user-modifiable-entity.model';
4+
import {TenantType} from '../modules/user-tenants/tenant-type.enum';
45

56
@model({
67
name: 'tenants',
@@ -18,6 +19,12 @@ export class Tenant extends UserModifiableEntity {
1819
})
1920
name: string;
2021

22+
@property({
23+
type: 'string',
24+
required: true,
25+
})
26+
type: TenantType;
27+
2128
@property({
2229
type: 'string',
2330
})

src/modules/audit/audit-log.controller.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export class AuditLogController {
5353
},
5454
})
5555
async count(
56-
@param.query.object('where', getWhereSchemaFor(AuditLog)) where?: Where,
56+
@param.query.object('where', getWhereSchemaFor(AuditLog))
57+
where?: Where<AuditLog>,
5758
): Promise<Count> {
5859
return await this.auditLogRepository.count(where);
5960
}
@@ -91,7 +92,8 @@ export class AuditLogController {
9192
})
9293
async updateAll(
9394
@requestBody() auditLog: AuditLog,
94-
@param.query.object('where', getWhereSchemaFor(AuditLog)) where?: Where,
95+
@param.query.object('where', getWhereSchemaFor(AuditLog))
96+
where?: Where<AuditLog>,
9597
): Promise<Count> {
9698
return await this.auditLogRepository.updateAll(auditLog, where);
9799
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export const enum TenantType {
2+
APPLICATION = 'application',
3+
CUSTOMER = 'customer',
4+
VENDOR = 'vendor',
5+
OTHER = 'other',
6+
}

0 commit comments

Comments
 (0)