

import 'package:json_annotation/json_annotation.dart';

part 'subscription_check_response.g.dart';

@JsonSerializable()
class SubscriptionCheckResponse {

  //订阅订单号
  @JsonKey(name: 'outTradeNo')
  String outTradeNo;

  //订阅组
  @JsonKey(name: 'subscriptionGroup')
  String? subscriptionGroup;

  //用户id
  @JsonKey(name: 'userId')
  String? userId;

  //续订状态 0 否 1 是
  @JsonKey(name: 'autoRenewStatus')
  int? autoRenewStatus;

  //过期时间戳，毫秒
  @JsonKey(name: 'renewItemId')
  int? renewItemId;

  //是否过期
  @JsonKey(name: 'expired')
  bool? expired;

  SubscriptionCheckResponse(
      {required this.outTradeNo,
        this.subscriptionGroup,
        this.userId,
        this.autoRenewStatus,
        this.renewItemId,
        this.expired});

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