mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: avatar model (#814)
This commit is contained in:
committed by
GitHub
parent
07d2b3b464
commit
cdeb843a84
@@ -1,7 +1,4 @@
|
||||
import 'package:PiliPlus/models/space/pr_info.dart';
|
||||
import 'package:PiliPlus/models/space/space_tag_bottom.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:PiliPlus/models/model_avatar.dart' hide Avatar;
|
||||
import 'package:PiliPlus/models/space/achieve.dart';
|
||||
import 'package:PiliPlus/models/space/avatar.dart';
|
||||
import 'package:PiliPlus/models/space/entrance.dart';
|
||||
@@ -11,10 +8,11 @@ import 'package:PiliPlus/models/space/likes.dart';
|
||||
import 'package:PiliPlus/models/space/nameplate.dart';
|
||||
import 'package:PiliPlus/models/space/nft_certificate.dart';
|
||||
import 'package:PiliPlus/models/space/official_verify.dart';
|
||||
import 'package:PiliPlus/models/space/pendant.dart';
|
||||
import 'package:PiliPlus/models/space/pr_info.dart';
|
||||
import 'package:PiliPlus/models/space/profession_verify.dart';
|
||||
import 'package:PiliPlus/models/space/relation.dart';
|
||||
import 'package:PiliPlus/models/space/vip.dart';
|
||||
import 'package:PiliPlus/models/space/space_tag_bottom.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'card.g.dart';
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'label.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Label {
|
||||
String? path;
|
||||
String? text;
|
||||
@JsonKey(name: 'label_theme')
|
||||
String? labelTheme;
|
||||
@JsonKey(name: 'text_color')
|
||||
String? textColor;
|
||||
@JsonKey(name: 'bg_style')
|
||||
int? bgStyle;
|
||||
@JsonKey(name: 'bg_color')
|
||||
String? bgColor;
|
||||
@JsonKey(name: 'border_color')
|
||||
String? borderColor;
|
||||
String? image;
|
||||
|
||||
Label({
|
||||
this.path,
|
||||
this.text,
|
||||
this.labelTheme,
|
||||
this.textColor,
|
||||
this.bgStyle,
|
||||
this.bgColor,
|
||||
this.borderColor,
|
||||
this.image,
|
||||
});
|
||||
|
||||
factory Label.fromJson(Map<String, dynamic> json) => _$LabelFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$LabelToJson(this);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'label.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Label _$LabelFromJson(Map<String, dynamic> json) => Label(
|
||||
path: json['path'] as String?,
|
||||
text: json['text'] as String?,
|
||||
labelTheme: json['label_theme'] as String?,
|
||||
textColor: json['text_color'] as String?,
|
||||
bgStyle: (json['bg_style'] as num?)?.toInt(),
|
||||
bgColor: json['bg_color'] as String?,
|
||||
borderColor: json['border_color'] as String?,
|
||||
image: json['image'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$LabelToJson(Label instance) => <String, dynamic>{
|
||||
'path': instance.path,
|
||||
'text': instance.text,
|
||||
'label_theme': instance.labelTheme,
|
||||
'text_color': instance.textColor,
|
||||
'bg_style': instance.bgStyle,
|
||||
'bg_color': instance.bgColor,
|
||||
'border_color': instance.borderColor,
|
||||
'image': instance.image,
|
||||
};
|
||||
@@ -1,29 +1,15 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
part 'official_verify.g.dart';
|
||||
class OfficialVerify extends BaseOfficialVerify {
|
||||
int? role;
|
||||
String? title;
|
||||
String? icon;
|
||||
String? spliceTitle;
|
||||
|
||||
@JsonSerializable()
|
||||
class OfficialVerify {
|
||||
int? type;
|
||||
String? desc;
|
||||
int? role;
|
||||
String? title;
|
||||
String? icon;
|
||||
@JsonKey(name: 'splice_title')
|
||||
String? spliceTitle;
|
||||
|
||||
OfficialVerify({
|
||||
this.type,
|
||||
this.desc,
|
||||
this.role,
|
||||
this.title,
|
||||
this.icon,
|
||||
this.spliceTitle,
|
||||
});
|
||||
|
||||
factory OfficialVerify.fromJson(Map<String, dynamic> json) {
|
||||
return _$OfficialVerifyFromJson(json);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => _$OfficialVerifyToJson(this);
|
||||
OfficialVerify.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
||||
role = json['role'];
|
||||
title = json['title'];
|
||||
icon = json['icon'];
|
||||
spliceTitle = json['splice_title'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'official_verify.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
OfficialVerify _$OfficialVerifyFromJson(Map<String, dynamic> json) =>
|
||||
OfficialVerify(
|
||||
type: (json['type'] as num?)?.toInt(),
|
||||
desc: json['desc'] as String?,
|
||||
role: (json['role'] as num?)?.toInt(),
|
||||
title: json['title'] as String?,
|
||||
icon: json['icon'] as String?,
|
||||
spliceTitle: json['splice_title'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OfficialVerifyToJson(OfficialVerify instance) =>
|
||||
<String, dynamic>{
|
||||
'type': instance.type,
|
||||
'desc': instance.desc,
|
||||
'role': instance.role,
|
||||
'title': instance.title,
|
||||
'icon': instance.icon,
|
||||
'splice_title': instance.spliceTitle,
|
||||
};
|
||||
@@ -1,33 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'pendant.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Pendant {
|
||||
int? pid;
|
||||
String? name;
|
||||
String? image;
|
||||
int? expire;
|
||||
@JsonKey(name: 'image_enhance')
|
||||
String? imageEnhance;
|
||||
@JsonKey(name: 'image_enhance_frame')
|
||||
String? imageEnhanceFrame;
|
||||
@JsonKey(name: 'n_pid')
|
||||
int? nPid;
|
||||
|
||||
Pendant({
|
||||
this.pid,
|
||||
this.name,
|
||||
this.image,
|
||||
this.expire,
|
||||
this.imageEnhance,
|
||||
this.imageEnhanceFrame,
|
||||
this.nPid,
|
||||
});
|
||||
|
||||
factory Pendant.fromJson(Map<String, dynamic> json) {
|
||||
return _$PendantFromJson(json);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => _$PendantToJson(this);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'pendant.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Pendant _$PendantFromJson(Map<String, dynamic> json) => Pendant(
|
||||
pid: (json['pid'] as num?)?.toInt(),
|
||||
name: json['name'] as String?,
|
||||
image: json['image'] as String?,
|
||||
expire: (json['expire'] as num?)?.toInt(),
|
||||
imageEnhance: json['image_enhance'] as String?,
|
||||
imageEnhanceFrame: json['image_enhance_frame'] as String?,
|
||||
nPid: (json['n_pid'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PendantToJson(Pendant instance) => <String, dynamic>{
|
||||
'pid': instance.pid,
|
||||
'name': instance.name,
|
||||
'image': instance.image,
|
||||
'expire': instance.expire,
|
||||
'image_enhance': instance.imageEnhance,
|
||||
'image_enhance_frame': instance.imageEnhanceFrame,
|
||||
'n_pid': instance.nPid,
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:PiliPlus/models/space/label.dart';
|
||||
|
||||
part 'vip.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Vip {
|
||||
int? vipType;
|
||||
int? vipDueDate;
|
||||
String? dueRemark;
|
||||
int? accessStatus;
|
||||
int? vipStatus;
|
||||
String? vipStatusWarn;
|
||||
int? themeType;
|
||||
Label? label;
|
||||
|
||||
Vip({
|
||||
this.vipType,
|
||||
this.vipDueDate,
|
||||
this.dueRemark,
|
||||
this.accessStatus,
|
||||
this.vipStatus,
|
||||
this.vipStatusWarn,
|
||||
this.themeType,
|
||||
this.label,
|
||||
});
|
||||
|
||||
factory Vip.fromJson(Map<String, dynamic> json) => _$VipFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$VipToJson(this);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'vip.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Vip _$VipFromJson(Map<String, dynamic> json) => Vip(
|
||||
vipType: (json['vipType'] as num?)?.toInt(),
|
||||
vipDueDate: (json['vipDueDate'] as num?)?.toInt(),
|
||||
dueRemark: json['dueRemark'] as String?,
|
||||
accessStatus: (json['accessStatus'] as num?)?.toInt(),
|
||||
vipStatus: (json['vipStatus'] as num?)?.toInt(),
|
||||
vipStatusWarn: json['vipStatusWarn'] as String?,
|
||||
themeType: (json['themeType'] as num?)?.toInt(),
|
||||
label: json['label'] == null
|
||||
? null
|
||||
: Label.fromJson(json['label'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$VipToJson(Vip instance) => <String, dynamic>{
|
||||
'vipType': instance.vipType,
|
||||
'vipDueDate': instance.vipDueDate,
|
||||
'dueRemark': instance.dueRemark,
|
||||
'accessStatus': instance.accessStatus,
|
||||
'vipStatus': instance.vipStatus,
|
||||
'vipStatusWarn': instance.vipStatusWarn,
|
||||
'themeType': instance.themeType,
|
||||
'label': instance.label,
|
||||
};
|
||||
Reference in New Issue
Block a user