talks.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import 'package:json_annotation/json_annotation.dart';
  2. part 'talks.g.dart';
  3. @JsonSerializable()
  4. class TalkBean {
  5. @JsonKey(name: 'id')
  6. late final String id;
  7. @JsonKey(name: 'taskId')
  8. String? taskId;
  9. @JsonKey(name: 'ssid')
  10. String? ssid;
  11. @JsonKey(name: 'audioUrl')
  12. String? audioUrl;
  13. @JsonKey(name: 'duration')
  14. double? duration;
  15. @JsonKey(name: 'characters')
  16. int? characters;
  17. @JsonKey(name: 'status')
  18. int? status;
  19. @JsonKey(name: 'title')
  20. String? title;
  21. @JsonKey(name: 'summary')
  22. String? summary;
  23. @JsonKey(name: 'createTime')
  24. String? createTime;
  25. @JsonKey(name: 'example')
  26. bool? isExample;
  27. TalkBean(
  28. {required this.id,
  29. this.taskId,
  30. this.ssid,
  31. this.audioUrl,
  32. this.duration,
  33. this.characters,
  34. this.status,
  35. this.title,
  36. this.summary,
  37. this.createTime,
  38. this.isExample});
  39. factory TalkBean.fromJson(Map<String, dynamic> json) =>
  40. _$TalkBeanFromJson(json);
  41. }
  42. class TalkStatus {
  43. TalkStatus._();
  44. //(0等待生成 1生成中,都处于生成中) 2成功 3失败 4未分析
  45. static int analysing = 0;
  46. static int waitAnalysis = 1;
  47. static int analysisSuccess = 2;
  48. static int analysisFail = 3;
  49. static int notAnalysis = 4;
  50. }