UNPKG

@jvhaile/loopback4-helper

Version:
58 lines (45 loc) 1.05 kB
import {Entity, model, property} from '@loopback/repository'; import {TimeStampedEntity} from "./time.stamped.model"; @model({settings: {strict: false}}) export class BaseUser extends TimeStampedEntity { @property({ type: 'string', id: true, generated: true, }) id?: string; @property({ type: 'string', }) firebaseUserId?: string; @property({ type: 'string', }) displayName?: string; @property({ type: 'string', }) phone?: string; @property({ type: 'string', }) email?: string; @property({ type: 'boolean', default: false, }) emailVerified?: boolean; @property({ 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;