Created
June 19, 2018 16:28
-
-
Save haverchuck/9b6b220f35ae19fe76d0703fae1ef538 to your computer and use it in GitHub Desktop.
ionic-amplify-part-1: item.class
This file contains hidden or 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
import { v4 as uuid } from 'uuid'; | |
export class ToDoList { | |
userId: any; | |
items: Array<ToDoItem> | |
constructor(params){ | |
this.items = params.items || []; | |
this.userId = params.userId; | |
} | |
} | |
export class ToDoItem { | |
id: string; | |
title: string; | |
description: string; | |
status: any; | |
constructor(params){ | |
this.id = uuid(); | |
this.title = params.title; | |
this.description = params.description; | |
this.status = 'new'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment