48 lines
1.3 KiB
Dart
48 lines
1.3 KiB
Dart
import 'package:quill_html_editor/quill_html_editor.dart';
|
|
|
|
class RecentIncidentsModel{
|
|
String incidentTitle = "";
|
|
String incidentId = "";
|
|
String userId = "";
|
|
String note = "";
|
|
int incidentDate = 0;
|
|
bool active = false;
|
|
String createdAt = "";
|
|
String updatedAt = "";
|
|
int v = 0;
|
|
QuillEditorController quillController = QuillEditorController();
|
|
|
|
RecentIncidentsModel.empty();
|
|
|
|
RecentIncidentsModel.fromJson(Map<String,dynamic> json){
|
|
incidentId = json['_id']??"";
|
|
userId = json['userId']??"";
|
|
note = json['note']??"";
|
|
incidentDate = json['incidentDate']??0;
|
|
active = json['active']??false;
|
|
createdAt = json['createdAt']??"";
|
|
updatedAt = json['updatedAt']??"";
|
|
incidentTitle = json['incidentTitle']??"";
|
|
v = json['__v']??0;
|
|
}
|
|
|
|
Map<String,dynamic> toJson(){
|
|
Map<String,dynamic> json = {
|
|
'_id' : incidentId,
|
|
'userId' : userId,
|
|
'note' : note,
|
|
'incidentDate' : incidentDate,
|
|
'active' : active,
|
|
'createdAt' : createdAt,
|
|
'updatedAt' : updatedAt,
|
|
'incidentTitle' : incidentTitle,
|
|
'__v' : v,
|
|
};
|
|
return json;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'RecentIncidentsModel{incidentId: $incidentId, userId: $userId, note: $note, incidentDate: $incidentDate, active: $active, createdAt: $createdAt, updatedAt: $updatedAt, v: $v}';
|
|
}
|
|
} |