import { Entity , hasOne , model , property } from '@loopback/repository' ; import { UserCredentials } from './user-credentials.model' ; @ model ( { settings : { strict : false , } , } ) export class User extends Entity { @ property ( { type : 'string' , id : true , generated : false , defaultFn : 'uuidv4' , } ) id : string ; @ property ( { type : 'string' , } ) realm ? : string ; @ property ( { type : 'string' , } ) username ? : string ; @ property ( { type : 'string' , required : true , index : { unique : true , } , } ) email : string ; @ property ( { type : 'boolean' , } ) emailVerified ? : boolean ; @ property ( { type : 'string' , } ) verificationToken ? : string ; @ hasOne ( ( ) => UserCredentials ) userCredentials : UserCredentials ; [ prop ] : any ; constructor ( data ? ) { super ( data ) ; } } export interface UserRelations { } export type UserWithRelations = User & UserRelations ;