You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
42 lines
1.2 KiB
/// 消费一对一RTC频道响应模型
|
|
class ConsumeRtcChannelResponse {
|
|
final bool isFree;
|
|
final int status;
|
|
final int availableBalance;
|
|
final int unitSellingBalance;
|
|
final String? code;
|
|
|
|
ConsumeRtcChannelResponse({
|
|
required this.isFree,
|
|
required this.status,
|
|
required this.availableBalance,
|
|
required this.unitSellingBalance,
|
|
this.code,
|
|
});
|
|
|
|
factory ConsumeRtcChannelResponse.fromJson(Map<String, dynamic> json) {
|
|
return ConsumeRtcChannelResponse(
|
|
isFree: json['isFree'] as bool? ?? false,
|
|
status: json['status'] as int? ?? 0,
|
|
availableBalance: json['availableBalance'] as int? ?? 0,
|
|
unitSellingBalance: json['unitSellingBalance'] as int? ?? 0,
|
|
code: json['code'] as String?,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'isFree': isFree,
|
|
'status': status,
|
|
'availableBalance': availableBalance,
|
|
'unitSellingBalance': unitSellingBalance,
|
|
'code': code,
|
|
};
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ConsumeRtcChannelResponse(isFree: $isFree, status: $status, availableBalance: $availableBalance, unitSellingBalance: $unitSellingBalance, code: $code)';
|
|
}
|
|
}
|
|
|