import {Entity, model, property} from '@loopback/repository'; @model() export class Sleep extends Entity { @property({ type: 'number', id: true, generated: true, }) id?: number; @property({ type: 'string', required: true, }) name: string; @property({ type: 'string', default: null, }) image?: string; @property({ type: 'string', default: null, }) description?: 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); } }