import 'package:json_annotation/json_annotation.dart';

part 'talks.g.dart';

@JsonSerializable()
class TalkBean {
  @JsonKey(name: 'id')
  String? id;

  @JsonKey(name: 'taskId')
  String? taskId;

  @JsonKey(name: 'ssid')
  String? ssid;

  @JsonKey(name: 'audioUrl')
  String? audioUrl;

  @JsonKey(name: 'duration')
  double? duration;

  @JsonKey(name: 'characters')
  int? characters;

  @JsonKey(name: 'status')
  int? status;

  @JsonKey(name: 'title')
  String? title;

  @JsonKey(name: 'summary')
  String? summary;

  @JsonKey(name: 'createTime')
  String? createTime;

  @JsonKey(name: 'example')
  bool? isExample;

  TalkBean(
      {this.id,
      this.taskId,
      this.ssid,
      this.audioUrl,
      this.duration,
      this.characters,
      this.status,
      this.title,
      this.summary,
      this.createTime,
      this.isExample});

  factory TalkBean.fromJson(Map<String, dynamic> json) =>
      _$TalkBeanFromJson(json);
}

class TalkStatus {
  TalkStatus._();

  static int notAnalysis = 0;
  static int analysing = 1;
  static int analysisSuccess = 2;
  static int analysisFail = 3;
}
