mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
add login log
This commit is contained in:
35
lib/module/others/login_log/login_log_bean.dart
Normal file
35
lib/module/others/login_log/login_log_bean.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
import 'package:json_conversion_annotation/json_conversion_annotation.dart';
|
||||
|
||||
/// @author NewTab
|
||||
@JsonConversion()
|
||||
class LoginLogBean {
|
||||
int? timestamp;
|
||||
String? address;
|
||||
String? ip;
|
||||
String? platform;
|
||||
int? status; //0代表成功,1代表失败
|
||||
|
||||
LoginLogBean({this.timestamp, this.address, this.ip, this.platform, this.status});
|
||||
|
||||
LoginLogBean.fromJson(Map<String, dynamic> json) {
|
||||
timestamp = json['timestamp'];
|
||||
address = json['address'];
|
||||
ip = json['ip'];
|
||||
platform = json['platform'];
|
||||
status = json['status'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['timestamp'] = this.timestamp;
|
||||
data['address'] = this.address;
|
||||
data['ip'] = this.ip;
|
||||
data['platform'] = this.platform;
|
||||
data['status'] = this.status;
|
||||
return data;
|
||||
}
|
||||
|
||||
static LoginLogBean jsonConversion(Map<String, dynamic> json) {
|
||||
return LoginLogBean.fromJson(json);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user