login/exp log

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-14 15:45:41 +08:00
parent 4275719844
commit e280f6ee4a
13 changed files with 433 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
import 'package:PiliPlus/models_new/login_log/list.dart';
class LoginLogData {
int? count;
List<LoginLogItem>? list;
LoginLogData({this.count, this.list});
factory LoginLogData.fromJson(Map<String, dynamic> json) => LoginLogData(
count: json['count'] as int?,
list: (json['list'] as List<dynamic>?)
?.map((e) => LoginLogItem.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -0,0 +1,26 @@
class LoginLogItem {
String ip;
int? time;
String timeAt;
bool? status;
int? type;
String geo;
LoginLogItem({
required this.ip,
this.time,
required this.timeAt,
this.status,
this.type,
required this.geo,
});
factory LoginLogItem.fromJson(Map<String, dynamic> json) => LoginLogItem(
ip: json['ip'] ?? '',
time: json['time'] as int?,
timeAt: json['time_at'] ?? '',
status: json['status'] as bool?,
type: json['type'] as int?,
geo: json['geo'] ?? '',
);
}