mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
Change model dir structure
This commit is contained in:
41
lib/data/model/server/tcp_status.dart
Normal file
41
lib/data/model/server/tcp_status.dart
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user