import {model, property} from '@loopback/repository'; import {UserModifiableEntity} from '@sourcefuse-npm/alivio-lib'; @model({name: 'sleep_logs'}) export class SleepLogs extends UserModifiableEntity { @property({ type: 'number', id: true, description: 'This is created when new entity is created.', }) id?: number; @property({ type: 'string', required: true, description: 'This is string and is a required field.', }) sleep: string; @property({ type: 'string', required: true, name: 'date_time', description: `Date in timestamptz format. This date represents the date you are filling the mood for.`, }) dateTime: Date; @property({ type: 'number', name: 'patient_id', description: 'This is string and is not required from front-end.', }) patientId?: number; @property({ type: 'string', description: 'This is string and is not required.', }) comment?: string; @property({ type: 'string', name: 'alert_key', description: 'This property maps to the logic for alter priority', jsonSchema: { enum: [ 'sleep_fine_alert', 'sleep_too_much_alert', 'not_good_sleep_alert', 'trouble_sleep_alert', ], }, }) alertKey?: string; constructor(data?: Partial) { super(data); } } export type SleepsWithRelations = SleepLogs;