@jvhaile/loopback4-helper
Version:
Helper components and tools for loopback 4.
58 lines (45 loc) • 1.05 kB
text/typescript
import {Entity, model, property} from '@loopback/repository';
import {TimeStampedEntity} from "./time.stamped.model";
({settings: {strict: false}})
export class BaseUser extends TimeStampedEntity {
({
type: 'string',
id: true,
generated: true,
})
id?: string;
({
type: 'string',
})
firebaseUserId?: string;
({
type: 'string',
})
displayName?: string;
({
type: 'string',
})
phone?: string;
({
type: 'string',
})
email?: string;
({
type: 'boolean',
default: false,
})
emailVerified?: boolean;
({
type: 'string',
default: 'user',
})
role?: string;
[prop: string]: any;
constructor(data?: Partial<BaseUser>) {
super(data);
}
}
export interface BaseUserRelations {
// describe navigational properties here
}
export type BaseUserWithRelations = BaseUser & BaseUserRelations;