character_info.dart 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import 'package:json_annotation/json_annotation.dart';
  2. part 'character_info.g.dart';
  3. @JsonSerializable()
  4. class CharacterInfo {
  5. //人设id
  6. @JsonKey(name: 'id')
  7. String? id;
  8. //人设名称
  9. @JsonKey(name: 'name')
  10. String? name;
  11. //头像
  12. @JsonKey(name: 'imageUrl')
  13. String? imageUrl;
  14. // 人设描述
  15. @JsonKey(name: 'description')
  16. String? description;
  17. // 人设表情
  18. @JsonKey(name: 'emoji')
  19. String? emoji;
  20. // 是否是VIP可用
  21. @JsonKey(name: 'isVip')
  22. bool? isVip;
  23. // 是否锁定
  24. @JsonKey(name: 'isLock')
  25. bool? isLock;
  26. // 是否已添加
  27. @JsonKey(name: 'isAdd')
  28. bool? isAdd;
  29. // 爱好列表(定制人设)
  30. @JsonKey(name: "hobbies")
  31. List<String>? hobbies;
  32. // 性格列表(定制人设)
  33. @JsonKey(name: "characters")
  34. List<String>? characters;
  35. @JsonKey(name: "birthday")
  36. String? birthday;
  37. @JsonKey(name: "gender")
  38. int? gender;
  39. @JsonKey(name: "createTime")
  40. String? createTime;
  41. CharacterInfo({
  42. this.id,
  43. this.name,
  44. this.imageUrl,
  45. this.description,
  46. this.emoji,
  47. this.isVip,
  48. this.isLock,
  49. this.isAdd,
  50. this.hobbies,
  51. this.characters,
  52. this.birthday,
  53. this.gender,
  54. this.createTime,
  55. });
  56. factory CharacterInfo.fromJson(Map<String, dynamic> json) =>
  57. _$CharacterInfoFromJson(json);
  58. Map<String, dynamic> toJson() => _$CharacterInfoToJson(this);
  59. }