From da0c881c46babba7a77130aeb7b002b6f688c777 Mon Sep 17 00:00:00 2001 From: virkt25 Date: Tue, 10 Jul 2018 19:39:32 -0400 Subject: [PATCH] refactor(example-todo): update files to match output from `lb4 model` --- examples/todo/src/models/todo.model.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/todo/src/models/todo.model.ts b/examples/todo/src/models/todo.model.ts index 6f4c45de27f9..ab6cb873abfb 100644 --- a/examples/todo/src/models/todo.model.ts +++ b/examples/todo/src/models/todo.model.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Entity, property, model} from '@loopback/repository'; +import {Entity, model, property} from '@loopback/repository'; @model() export class Todo extends Entity { @@ -27,22 +27,18 @@ export class Todo extends Entity { @property({ type: 'boolean', }) - isComplete: boolean; + isComplete?: boolean; @property({ type: 'string', }) - remindAtAddress: string; // address,city,zipcode + remindAtAddress?: string; // address,city,zipcode // TODO(bajtos) Use LoopBack's GeoPoint type here @property({ type: 'string', }) - remindAtGeo: string; // latitude,longitude - - getId() { - return this.id; - } + remindAtGeo?: string; // latitude,longitude constructor(data?: Partial) { super(data);