This commit is contained in:
jyuesong
2022-01-20 19:59:37 +08:00
parent f389f32d32
commit 9b51b5c26c
3 changed files with 5 additions and 10 deletions

View File

@@ -10,18 +10,11 @@ class EnvBean {
String? name;
String? remarks;
EnvBean(
{this.value,
this.sId,
this.created,
this.status,
this.timestamp,
this.name,
this.remarks});
EnvBean({this.value, this.sId, this.created, this.status, this.timestamp, this.name, this.remarks});
EnvBean.fromJson(Map<String, dynamic> json) {
value = json['value'];
sId = json['_id'];
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
created = json['created'];
status = json['status'];
timestamp = json['timestamp'];

View File

@@ -43,7 +43,7 @@ class TaskBean {
command = json['command'].toString();
schedule = json['schedule'].toString();
saved = json['saved'];
sId = json['_id'].toString();
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
created = json['created'];
status = json['status'];
timestamp = json['timestamp'].toString();