-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(example-todo): update files to match output from
lb4 model
- Loading branch information
Showing
4 changed files
with
58 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright IBM Corp. 2017,2018. All Rights Reserved. | ||
// Node module: @loopback/example-todo | ||
// This file is licensed under the MIT License. | ||
// License text available at https://opensource.org/licenses/MIT | ||
|
||
export * from './todo.base.model'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright IBM Corp. 2017,2018. All Rights Reserved. | ||
// Node module: @loopback/example-todo | ||
// This file is licensed under the MIT License. | ||
// License text available at https://opensource.org/licenses/MIT | ||
|
||
import {Entity, ModelDefinition} from '@loopback/repository'; | ||
const modelDef = require('../todo.model.json'); | ||
|
||
export class TodoBase extends Entity { | ||
static definition = new ModelDefinition(modelDef); | ||
|
||
id?: number; | ||
title: string; | ||
desc?: string; | ||
isComplete: boolean; | ||
remindAtAddress?: string; | ||
remindAtGeo?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "Todo", | ||
"extends": "Entity", | ||
"properties": { | ||
"id": { | ||
"type": "number", | ||
"id": true, | ||
"required": false | ||
}, | ||
"title": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"desc": { | ||
"type": "string", | ||
"required": false | ||
}, | ||
"isComplete": { | ||
"type": "boolean", | ||
"required": true, | ||
"defaultValue": "false" | ||
}, | ||
"remindAtAddress": { | ||
"type": "string", | ||
"required": false | ||
}, | ||
"remindAtGeo": { | ||
"type": "string", | ||
"required": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters