created models
This commit is contained in:
14
lib/models/checklist.dart
Normal file
14
lib/models/checklist.dart
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import 'listitem.dart';
|
||||||
|
|
||||||
|
class Checklist {
|
||||||
|
final int id;
|
||||||
|
final String ownerId;
|
||||||
|
String title;
|
||||||
|
String description;
|
||||||
|
final DateTime createdTime;
|
||||||
|
List<Item> items;
|
||||||
|
|
||||||
|
Checklist(this.id, this.ownerId, this.title, this.description,
|
||||||
|
this.createdTime, List<Item>? items)
|
||||||
|
: items = items ?? [];
|
||||||
|
}
|
||||||
12
lib/models/listitem.dart
Normal file
12
lib/models/listitem.dart
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
class Item {
|
||||||
|
final int id;
|
||||||
|
final String ownerId;
|
||||||
|
String title;
|
||||||
|
String description;
|
||||||
|
final DateTime createdTime;
|
||||||
|
List<String> checkedBy;
|
||||||
|
|
||||||
|
Item(this.id, this.ownerId, this.title, this.description, this.createdTime,
|
||||||
|
List<String>? checkedBy)
|
||||||
|
: checkedBy = checkedBy ?? [];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user