1
This commit is contained in:
@@ -1,32 +1,22 @@
|
||||
class UserInfo {
|
||||
int? id;
|
||||
String? name;
|
||||
dynamic avatar;
|
||||
String? avatar;
|
||||
String? description;
|
||||
String? email;
|
||||
dynamic emailVerifiedAt;
|
||||
dynamic googleId;
|
||||
dynamic appleId;
|
||||
String? lastLoginIp;
|
||||
String? lastLoginTime;
|
||||
dynamic lastUsedTime;
|
||||
String? googleId;
|
||||
String? appleId;
|
||||
int? status;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
UserInfo({
|
||||
this.id,
|
||||
this.name,
|
||||
this.avatar,
|
||||
this.description,
|
||||
this.email,
|
||||
this.emailVerifiedAt,
|
||||
this.googleId,
|
||||
this.appleId,
|
||||
this.lastLoginIp,
|
||||
this.lastLoginTime,
|
||||
this.lastUsedTime,
|
||||
this.status,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -34,16 +24,11 @@ class UserInfo {
|
||||
map["id"] = id;
|
||||
map["name"] = name;
|
||||
map["avatar"] = avatar;
|
||||
map["description"] = description;
|
||||
map["email"] = email;
|
||||
map["email_verified_at"] = emailVerifiedAt;
|
||||
map["google_id"] = googleId;
|
||||
map["apple_id"] = appleId;
|
||||
map["last_login_ip"] = lastLoginIp;
|
||||
map["last_login_time"] = lastLoginTime;
|
||||
map["last_used_time"] = lastUsedTime;
|
||||
map["status"] = status;
|
||||
map["created_at"] = createdAt;
|
||||
map["updated_at"] = updatedAt;
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -51,19 +36,38 @@ class UserInfo {
|
||||
id = json["id"] ?? 0;
|
||||
name = json["name"] ?? "";
|
||||
avatar = json["avatar"];
|
||||
description = json["description"] ?? "";
|
||||
email = json["email"] ?? "";
|
||||
emailVerifiedAt = json["email_verified_at"];
|
||||
googleId = json["google_id"];
|
||||
appleId = json["apple_id"];
|
||||
lastLoginIp = json["last_login_ip"] ?? "";
|
||||
lastLoginTime = json["last_login_time"] ?? "";
|
||||
lastUsedTime = json["last_used_time"];
|
||||
status = json["status"] ?? 0;
|
||||
createdAt = json["created_at"] ?? "";
|
||||
updatedAt = json["updated_at"] ?? "";
|
||||
}
|
||||
|
||||
/// copyWith 方法
|
||||
UserInfo copyWith({
|
||||
int? id,
|
||||
String? name,
|
||||
String? avatar,
|
||||
String? description,
|
||||
String? email,
|
||||
String? googleId,
|
||||
String? appleId,
|
||||
int? status,
|
||||
}) {
|
||||
return UserInfo(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
avatar: avatar ?? this.avatar,
|
||||
description: description ?? this.description,
|
||||
email: email ?? this.email,
|
||||
googleId: googleId ?? this.googleId,
|
||||
appleId: appleId ?? this.appleId,
|
||||
status: status ?? this.status,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class LoginDto {
|
||||
String? accessToken;
|
||||
UserInfo? userInfo;
|
||||
|
||||
Reference in New Issue
Block a user