import 'package:json_annotation/json_annotation.dart'; part 'character_info.g.dart'; @JsonSerializable() class CharacterInfo { //人设id @JsonKey(name: 'id') String? id; //人设名称 @JsonKey(name: 'name') String? name; //头像 @JsonKey(name: 'imageUrl') String? imageUrl; // 人设描述 @JsonKey(name: 'description') String? description; // 人设表情 @JsonKey(name: 'emoji') String? emoji; // 是否是VIP可用 @JsonKey(name: 'isVip') bool? isVip; // 是否锁定 @JsonKey(name: 'isLock') bool? isLock; // 是否已添加 @JsonKey(name: 'isAdd') bool? isAdd; // 爱好列表(定制人设) @JsonKey(name: "hobbies") List? hobbies; // 性格列表(定制人设) @JsonKey(name: "characters") List? characters; @JsonKey(name: "birthday") String? birthday; @JsonKey(name: "gender") int? gender; @JsonKey(name: "createTime") String? createTime; CharacterInfo({ this.id, this.name, this.imageUrl, this.description, this.emoji, this.isVip, this.isLock, this.isAdd, this.hobbies, this.characters, this.birthday, this.gender, this.createTime, }); factory CharacterInfo.fromJson(Map json) => _$CharacterInfoFromJson(json); Map toJson() => _$CharacterInfoToJson(this); }