Change model dir structure

This commit is contained in:
LollipopKit
2021-10-28 21:04:59 +08:00
parent 6426277406
commit 6db223ec5a
24 changed files with 71 additions and 51 deletions

View File

@@ -0,0 +1,41 @@
///
/// Code generated by jsonToDartModel https://ashamp.github.io/jsonToDartModel/
///
class TcpStatus {
/*
{
"maxConn": 0,
"active": 1,
"passive": 2,
"fail": 3
}
*/
late int maxConn;
late int active;
late int passive;
late int fail;
TcpStatus(
this.maxConn,
this.active,
this.passive,
this.fail,
);
TcpStatus.fromJson(Map<String, dynamic> json) {
maxConn = json["maxConn"].toInt();
active = json["active"].toInt();
passive = json["passive"].toInt();
fail = json["fail"].toInt();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data["maxConn"] = maxConn;
data["active"] = active;
data["passive"] = passive;
data["fail"] = fail;
return data;
}
}