class AirdropRecordItem {
  final int id;
  final int? stakingOrderId;
  final String? coinUnit;
  final String amount;
  final int status;
  final String? claimTime;
  final String? auditTime;
  final String? auditRemark;
  final String? createTime;

  const AirdropRecordItem({
    required this.id,
    this.stakingOrderId,
    this.coinUnit,
    required this.amount,
    required this.status,
    this.claimTime,
    this.auditTime,
    this.auditRemark,
    this.createTime,
  });

  factory AirdropRecordItem.fromJson(Map<String, dynamic> json) {
    return AirdropRecordItem(
      id: int.tryParse('${json['id'] ?? 0}') ?? 0,
      stakingOrderId: json['stakingOrderId'] == null
          ? null
          : int.tryParse('${json['stakingOrderId']}'),
      coinUnit: json['coinUnit']?.toString(),
      amount: '${json['amount'] ?? '0'}',
      status: int.tryParse('${json['status'] ?? 0}') ?? 0,
      claimTime: json['claimTime']?.toString(),
      auditTime: json['auditTime']?.toString(),
      auditRemark: json['auditRemark']?.toString(),
      createTime: json['createTime']?.toString(),
    );
  }
}

class AirdropRecordPage {
  final List<AirdropRecordItem> content;
  final int totalPages;
  final int pageNo;

  const AirdropRecordPage({
    required this.content,
    required this.totalPages,
    required this.pageNo,
  });
}
