character_info.dart 890 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. @JsonKey(name: 'isVip')
  21. bool? isVip;
  22. @JsonKey(name: 'isLock')
  23. bool? isLock;
  24. @JsonKey(name: 'isAdd')
  25. bool? isAdd;
  26. CharacterInfo({
  27. this.id,
  28. this.name,
  29. this.imageUrl,
  30. this.description,
  31. this.emoji,
  32. this.isVip,
  33. this.isLock,
  34. this.isAdd,
  35. });
  36. factory CharacterInfo.fromJson(Map<String, dynamic> json) =>
  37. _$CharacterInfoFromJson(json);
  38. Map<String, dynamic> toJson() => _$CharacterInfoToJson(this);
  39. }