Download this file

intervention.model.ts    34 lines (28 with data), 582 Bytes

import {Entity, model, property} from '@loopback/repository';

@model()
export class Intervention extends Entity {
    @property({
        type: 'string',
        id: true,
        generated: true,
    })
    id?: string;

    @property({
        type: 'string',
        required: true,
    })
    description: string;

    @property({
        type: 'date',
        required: true,
    })
    timestamp: string;

    @property({
        type: 'string',
        required: true,
    })
    status: string;

    constructor(data?: Partial<Intervention>) {
        super(data);
    }
}