qiniu_info_model.dart 918 Bytes

import 'package:json_annotation/json_annotation.dart';

part 'qiniu_info_model.g.dart';

@JsonSerializable()
class QiniuInfoModel extends Object {
  @JsonKey(name: 'ret')
  int? ret;

  @JsonKey(name: 'data')
  QiniuInfoSunModel? data;

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

  QiniuInfoModel(
    this.ret,
    this.data,
    this.msg,
  );

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

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

@JsonSerializable()
class QiniuInfoSunModel extends Object {
  @JsonKey(name: 'token')
  String? token;

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

  QiniuInfoSunModel(
    this.token,
    this.domain,
  );

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

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