talks.dart 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. @JsonKey(name: 'oversizeFile')
  28. bool? oversizeFile;
  29. TalkBean(
  30. {required this.id,
  31. this.taskId,
  32. this.ssid,
  33. this.audioUrl,
  34. this.duration,
  35. this.characters,
  36. this.status,
  37. this.title,
  38. this.summary,
  39. this.createTime,
  40. this.isExample,
  41. this.oversizeFile});
  42. factory TalkBean.fromJson(Map<String, dynamic> json) =>
  43. _$TalkBeanFromJson(json);
  44. }
  45. class TalkStatus {
  46. TalkStatus._();
  47. //(0等待生成 1生成中,都处于生成中) 2成功 3失败 4未分析
  48. static int analysing = 0;
  49. static int waitAnalysis = 1;
  50. static int analysisSuccess = 2;
  51. static int analysisFail = 3;
  52. static int notAnalysis = 4;
  53. }