Skip to content

Instantly share code, notes, and snippets.

@haverchuck
Created June 19, 2018 16:28
Show Gist options
  • Save haverchuck/9b6b220f35ae19fe76d0703fae1ef538 to your computer and use it in GitHub Desktop.
Save haverchuck/9b6b220f35ae19fe76d0703fae1ef538 to your computer and use it in GitHub Desktop.
ionic-amplify-part-1: item.class
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