From 223303191a79ad6783ccbb2d443ebe72eecd3a30 Mon Sep 17 00:00:00 2001 From: marcoabat Date: Sat, 5 Aug 2023 02:21:33 +0200 Subject: [PATCH] created models --- lib/models/checklist.dart | 14 ++++++++++++++ lib/models/listitem.dart | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 lib/models/checklist.dart create mode 100644 lib/models/listitem.dart diff --git a/lib/models/checklist.dart b/lib/models/checklist.dart new file mode 100644 index 0000000..2d33654 --- /dev/null +++ b/lib/models/checklist.dart @@ -0,0 +1,14 @@ +import 'listitem.dart'; + +class Checklist { + final int id; + final String ownerId; + String title; + String description; + final DateTime createdTime; + List items; + + Checklist(this.id, this.ownerId, this.title, this.description, + this.createdTime, List? items) + : items = items ?? []; +} diff --git a/lib/models/listitem.dart b/lib/models/listitem.dart new file mode 100644 index 0000000..6183f71 --- /dev/null +++ b/lib/models/listitem.dart @@ -0,0 +1,12 @@ +class Item { + final int id; + final String ownerId; + String title; + String description; + final DateTime createdTime; + List checkedBy; + + Item(this.id, this.ownerId, this.title, this.description, this.createdTime, + List? checkedBy) + : checkedBy = checkedBy ?? []; +}