“DaisyWu” c6be67cc46 feat: 1,绑定星图配置接口对接及逻辑处理
2,获取个人信息新增星图配置相关未绑定成功校验处理
2024-12-12 10:30:48 +08:00

174 lines
4.5 KiB
Dart
Executable File

class MinePersonInfoEntity {
MinePersonInfoEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
MinePersonInfoEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
data =
json['data'] != null ? MinePersonInfoData.fromJson(json['data']) : null;
}
int? errorCode;
String? description;
String? errorMsg;
MinePersonInfoData? data;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['errorCode'] = errorCode;
data['description'] = description;
data['errorMsg'] = errorMsg;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
return data;
}
}
class MinePersonInfoData {
MinePersonInfoData(
{this.mobile,
this.uid,
this.haveSafeAnswer,
this.nickname,
this.headUrl,
this.accountName,
this.countryId,
this.email,
this.countryName,
this.isVip,
this.deviceId,
this.lang,
this.amazonAlexa,
this.googleHome,
this.starchart});
MinePersonInfoData.fromJson(Map<String, dynamic> json) {
mobile = json['mobile'];
uid = json['uid'];
haveSafeAnswer = json['haveSafeAnswer'];
nickname = json['nickname'];
headUrl = json['headUrl'];
accountName = json['accountName'];
countryId = json['countryId'];
email = json['email'];
countryName = json['countryName'];
isVip = json['isVip'];
deviceId = json['deviceId'];
lang = json['lang'];
amazonAlexa = json['amazonAlexa'] != null
? AmazonAlexa.fromJson(json['amazonAlexa'])
: null;
googleHome = json['googleHome'] != null
? GoogleHome.fromJson(json['googleHome'])
: null;
starchart = json['starchart'] != null
? Starchart.fromJson(json['starchart'])
: null;
}
String? mobile;
int? uid;
int? haveSafeAnswer;
String? nickname;
String? headUrl;
String? accountName;
int? countryId;
String? email;
String? countryName;
int? isVip;
String? deviceId;
String? lang;
AmazonAlexa? amazonAlexa;
GoogleHome? googleHome;
Starchart? starchart;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['mobile'] = mobile;
data['uid'] = uid;
data['haveSafeAnswer'] = haveSafeAnswer;
data['nickname'] = nickname;
data['headUrl'] = headUrl;
data['accountName'] = accountName;
data['countryId'] = countryId;
data['email'] = email;
data['countryName'] = countryName;
data['isVip'] = isVip;
data['deviceId'] = deviceId;
data['lang'] = lang;
if (amazonAlexa != null) {
data['amazonAlexa'] = amazonAlexa!.toJson();
}
if (googleHome != null) {
data['googleHome'] = googleHome!.toJson();
}
if (starchart != null) {
data['starchart'] = starchart!.toJson();
}
return data;
}
}
class AmazonAlexa {
AmazonAlexa({this.skillName, this.langs});
AmazonAlexa.fromJson(Map<String, dynamic> json) {
skillName = json['skillName'];
langs = json['langs'].cast<String>();
}
String? skillName;
List<String>? langs;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['skillName'] = skillName;
data['langs'] = langs;
return data;
}
}
class GoogleHome {
GoogleHome({this.actionName, this.langs});
GoogleHome.fromJson(Map<String, dynamic> json) {
actionName = json['actionName'];
langs = json['langs'].cast<String>();
}
String? actionName;
List<String>? langs;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['actionName'] = actionName;
data['langs'] = langs;
return data;
}
}
class Starchart {
String? starchartId;
String? starchartPeerPublicKey;
String? starchartPeerPrivateKey;
Starchart(
{this.starchartId,
this.starchartPeerPublicKey,
this.starchartPeerPrivateKey});
Starchart.fromJson(Map<String, dynamic> json) {
starchartId = json['starchartId'];
starchartPeerPublicKey = json['starchartPeerPublicKey'];
starchartPeerPrivateKey = json['starchartPeerPrivateKey'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>();
data['starchartId'] = this.starchartId;
data['starchartPeerPublicKey'] = this.starchartPeerPublicKey;
data['starchartPeerPrivateKey'] = this.starchartPeerPrivateKey;
return data;
}
}