import 'package:json_annotation/json_annotation.dart';

part 'upgrade_entity.g.dart';

@JsonSerializable()
class UpgradeEntity extends Object {

  @JsonKey(name: 'code')
  int code;

  @JsonKey(name: 'message')
  String message;

  @JsonKey(name: 'success')
  bool success;

  @JsonKey(name: 'data')
  UpgradeData data;

  UpgradeEntity(this.code,this.message,this.success,this.data,);

  factory UpgradeEntity.fromJson(Map<String, dynamic> srcJson) => _$UpgradeEntityFromJson(srcJson);

  Map<String, dynamic> toJson() => _$UpgradeEntityToJson(this);

}


@JsonSerializable()
class UpgradeData extends Object {

  @JsonKey(name: 'versionCode')
  int versionCode;

  @JsonKey(name: 'versionName')
  String versionName;

  @JsonKey(name: 'updateType')
  int updateType;

  @JsonKey(name: 'versionDescribe')
  String versionDescribe;

  @JsonKey(name: 'androidurl')
  String androidurl;

  @JsonKey(name: 'appStoreUrl')
  String appStoreUrl;

  UpgradeData(this.versionCode,this.versionName,this.updateType,this.versionDescribe,this.androidurl,this.appStoreUrl);

  factory UpgradeData.fromJson(Map<String, dynamic> srcJson) => _$UpgradeDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$UpgradeDataToJson(this);

}
