710 lines
20 KiB
Dart
710 lines
20 KiB
Dart
import 'dart:convert';
|
|
|
|
import 'package:in_app_purchase/in_app_purchase.dart';
|
|
|
|
/// id : 93
|
|
/// status : "enable"
|
|
/// price : "59.99"
|
|
/// coins : 6000
|
|
/// send_coins : 6000
|
|
/// buy_type : "coins"
|
|
/// sort : 12
|
|
/// description : ""
|
|
/// vip_type : ""
|
|
/// title : "59.99 for coins"
|
|
/// brief : ""
|
|
/// created_at : "2025-04-15 07:01:47"
|
|
/// origin_price : "0.00"
|
|
/// backhaul_price : "59.99"
|
|
/// ios_template_id : "coins_59.99"
|
|
/// android_template_id : "coins_59.99"
|
|
/// currency : "US$"
|
|
/// updated_at : "2025-07-02 06:48:47"
|
|
/// translate_key : ""
|
|
/// platform : "all"
|
|
/// lang_id : 0
|
|
/// corner_marker : "Popularity"
|
|
/// first_promotion_price : "0.00"
|
|
/// version : 2
|
|
/// user_level : "high"
|
|
/// vip_days : 0
|
|
/// user_promise_level : ""
|
|
/// use_once : 0
|
|
/// send_coin_ttl : 1
|
|
/// backhaul_percent : 100
|
|
/// pay_template_id : 2
|
|
/// deleted_at : ""
|
|
/// pay_product_id : 14
|
|
/// ext_info : "{\"size\": \"big\", \"backhaul_percent_conf\": []}"
|
|
/// factor : "1.00"
|
|
/// short_type : ""
|
|
/// vip_type_key : ""
|
|
/// auto_sub : "Automatic renewal, cancel at any time"
|
|
/// size : "big"
|
|
|
|
KtGoodsBean ktGoodsBeanFromJson(String str) => KtGoodsBean.fromJson(json.decode(str));
|
|
|
|
String ktGoodsBeanToJson(KtGoodsBean data) => json.encode(data.toJson());
|
|
|
|
class KtGoodsBean {
|
|
KtGoodsBean({
|
|
int? id,
|
|
String? status,
|
|
String? price,
|
|
int? coins,
|
|
int? sendCoins,
|
|
String? buyType,
|
|
int? sort,
|
|
String? description,
|
|
String? vipType,
|
|
String? title,
|
|
String? brief,
|
|
String? createdAt,
|
|
String? originPrice,
|
|
String? backhaulPrice,
|
|
String? iosTemplateId,
|
|
String? androidTemplateId,
|
|
String? currency,
|
|
String? updatedAt,
|
|
String? translateKey,
|
|
String? platform,
|
|
int? langId,
|
|
String? cornerMarker,
|
|
String? firstPromotionPrice,
|
|
int? version,
|
|
String? userLevel,
|
|
int? vipDays,
|
|
String? userPromiseLevel,
|
|
int? useOnce,
|
|
int? sendCoinTtl,
|
|
int? backhaulPercent,
|
|
int? payTemplateId,
|
|
String? deletedAt,
|
|
int? payProductId,
|
|
ExtInfo? extInfo,
|
|
String? factor,
|
|
String? shortType,
|
|
String? vipTypeKey,
|
|
String? autoSub,
|
|
String? size,
|
|
String? orderCode,
|
|
String? transactionId,
|
|
String? serverVerificationData,
|
|
ProductDetails? productDetails,
|
|
}) {
|
|
_id = id;
|
|
_status = status;
|
|
_price = price;
|
|
_coins = coins;
|
|
_sendCoins = sendCoins;
|
|
_buyType = buyType;
|
|
_sort = sort;
|
|
_description = description;
|
|
_vipType = vipType;
|
|
_title = title;
|
|
_brief = brief;
|
|
_createdAt = createdAt;
|
|
_originPrice = originPrice;
|
|
_backhaulPrice = backhaulPrice;
|
|
_iosTemplateId = iosTemplateId;
|
|
_androidTemplateId = androidTemplateId;
|
|
_currency = currency;
|
|
_updatedAt = updatedAt;
|
|
_translateKey = translateKey;
|
|
_platform = platform;
|
|
_langId = langId;
|
|
_cornerMarker = cornerMarker;
|
|
_firstPromotionPrice = firstPromotionPrice;
|
|
_version = version;
|
|
_userLevel = userLevel;
|
|
_vipDays = vipDays;
|
|
_userPromiseLevel = userPromiseLevel;
|
|
_useOnce = useOnce;
|
|
_sendCoinTtl = sendCoinTtl;
|
|
_backhaulPercent = backhaulPercent;
|
|
_payTemplateId = payTemplateId;
|
|
_deletedAt = deletedAt;
|
|
_payProductId = payProductId;
|
|
_extInfo = extInfo;
|
|
_factor = factor;
|
|
_shortType = shortType;
|
|
_vipTypeKey = vipTypeKey;
|
|
_autoSub = autoSub;
|
|
_size = size;
|
|
_orderCode = orderCode;
|
|
_transactionId = transactionId;
|
|
_serverVerificationData = serverVerificationData;
|
|
_productDetails = productDetails;
|
|
}
|
|
|
|
KtGoodsBean.fromJson(dynamic json) {
|
|
_id = json['id'];
|
|
_status = json['status'];
|
|
_price = json['price'];
|
|
_coins = json['coins'];
|
|
_sendCoins = json['send_coins'];
|
|
_buyType = json['buy_type'];
|
|
_sort = json['sort'];
|
|
_description = json['description'];
|
|
_vipType = json['vip_type'];
|
|
_title = json['title'];
|
|
_brief = json['brief'];
|
|
_createdAt = json['created_at'];
|
|
_originPrice = json['origin_price'];
|
|
_backhaulPrice = json['backhaul_price'];
|
|
_iosTemplateId = json['ios_template_id'];
|
|
_androidTemplateId = json['android_template_id'];
|
|
_currency = json['currency'];
|
|
_updatedAt = json['updated_at'];
|
|
_translateKey = json['translate_key'];
|
|
_platform = json['platform'];
|
|
_langId = json['lang_id'];
|
|
_cornerMarker = json['corner_marker'];
|
|
_firstPromotionPrice = json['first_promotion_price'];
|
|
_version = json['version'];
|
|
_userLevel = json['user_level'];
|
|
_vipDays = json['vip_days'];
|
|
_userPromiseLevel = json['user_promise_level'];
|
|
_useOnce = json['use_once'];
|
|
_sendCoinTtl = json['send_coin_ttl'];
|
|
_backhaulPercent = json['backhaul_percent'];
|
|
_payTemplateId = json['pay_template_id'];
|
|
_deletedAt = json['deleted_at'];
|
|
_payProductId = json['pay_product_id'];
|
|
_extInfo = json['ext_info'] != null ? ExtInfo.fromJson(json['ext_info']) : null;
|
|
_factor = json['factor'];
|
|
_shortType = json['short_type'];
|
|
_vipTypeKey = json['vip_type_key'];
|
|
_autoSub = json['auto_sub'];
|
|
_size = json['size'];
|
|
_orderCode = json['orderCode'];
|
|
_transactionId = json['transactionId'];
|
|
_serverVerificationData = json['serverVerificationData'];
|
|
_productDetails = json['productDetails'];
|
|
}
|
|
|
|
int? _id;
|
|
String? _status;
|
|
String? _price;
|
|
int? _coins;
|
|
int? _sendCoins;
|
|
String? _buyType;
|
|
int? _sort;
|
|
String? _description;
|
|
String? _vipType;
|
|
String? _title;
|
|
String? _brief;
|
|
String? _createdAt;
|
|
String? _originPrice;
|
|
String? _backhaulPrice;
|
|
String? _iosTemplateId;
|
|
String? _androidTemplateId;
|
|
String? _currency;
|
|
String? _updatedAt;
|
|
String? _translateKey;
|
|
String? _platform;
|
|
int? _langId;
|
|
String? _cornerMarker;
|
|
String? _firstPromotionPrice;
|
|
int? _version;
|
|
String? _userLevel;
|
|
int? _vipDays;
|
|
String? _userPromiseLevel;
|
|
int? _useOnce;
|
|
int? _sendCoinTtl;
|
|
int? _backhaulPercent;
|
|
int? _payTemplateId;
|
|
String? _deletedAt;
|
|
int? _payProductId;
|
|
ExtInfo? _extInfo;
|
|
String? _factor;
|
|
String? _shortType;
|
|
String? _vipTypeKey;
|
|
String? _autoSub;
|
|
String? _size;
|
|
String? _orderCode;
|
|
String? _transactionId;
|
|
String? _serverVerificationData;
|
|
ProductDetails? _productDetails;
|
|
|
|
KtGoodsBean copyWith({
|
|
int? id,
|
|
String? status,
|
|
String? price,
|
|
int? coins,
|
|
int? sendCoins,
|
|
String? buyType,
|
|
int? sort,
|
|
String? description,
|
|
String? vipType,
|
|
String? title,
|
|
String? brief,
|
|
String? createdAt,
|
|
String? originPrice,
|
|
String? backhaulPrice,
|
|
String? iosTemplateId,
|
|
String? androidTemplateId,
|
|
String? currency,
|
|
String? updatedAt,
|
|
String? translateKey,
|
|
String? platform,
|
|
int? langId,
|
|
String? cornerMarker,
|
|
String? firstPromotionPrice,
|
|
int? version,
|
|
String? userLevel,
|
|
int? vipDays,
|
|
String? userPromiseLevel,
|
|
int? useOnce,
|
|
int? sendCoinTtl,
|
|
int? backhaulPercent,
|
|
int? payTemplateId,
|
|
String? deletedAt,
|
|
int? payProductId,
|
|
ExtInfo? extInfo,
|
|
String? factor,
|
|
String? shortType,
|
|
String? vipTypeKey,
|
|
String? autoSub,
|
|
String? size,
|
|
String? orderCode,
|
|
String? transactionId,
|
|
String? serverVerificationData,
|
|
ProductDetails? productDetails,
|
|
}) => KtGoodsBean(
|
|
id: id ?? _id,
|
|
status: status ?? _status,
|
|
price: price ?? _price,
|
|
coins: coins ?? _coins,
|
|
sendCoins: sendCoins ?? _sendCoins,
|
|
buyType: buyType ?? _buyType,
|
|
sort: sort ?? _sort,
|
|
description: description ?? _description,
|
|
vipType: vipType ?? _vipType,
|
|
title: title ?? _title,
|
|
brief: brief ?? _brief,
|
|
createdAt: createdAt ?? _createdAt,
|
|
originPrice: originPrice ?? _originPrice,
|
|
backhaulPrice: backhaulPrice ?? _backhaulPrice,
|
|
iosTemplateId: iosTemplateId ?? _iosTemplateId,
|
|
androidTemplateId: androidTemplateId ?? _androidTemplateId,
|
|
currency: currency ?? _currency,
|
|
updatedAt: updatedAt ?? _updatedAt,
|
|
translateKey: translateKey ?? _translateKey,
|
|
platform: platform ?? _platform,
|
|
langId: langId ?? _langId,
|
|
cornerMarker: cornerMarker ?? _cornerMarker,
|
|
firstPromotionPrice: firstPromotionPrice ?? _firstPromotionPrice,
|
|
version: version ?? _version,
|
|
userLevel: userLevel ?? _userLevel,
|
|
vipDays: vipDays ?? _vipDays,
|
|
userPromiseLevel: userPromiseLevel ?? _userPromiseLevel,
|
|
useOnce: useOnce ?? _useOnce,
|
|
sendCoinTtl: sendCoinTtl ?? _sendCoinTtl,
|
|
backhaulPercent: backhaulPercent ?? _backhaulPercent,
|
|
payTemplateId: payTemplateId ?? _payTemplateId,
|
|
deletedAt: deletedAt ?? _deletedAt,
|
|
payProductId: payProductId ?? _payProductId,
|
|
extInfo: extInfo ?? _extInfo,
|
|
factor: factor ?? _factor,
|
|
shortType: shortType ?? _shortType,
|
|
vipTypeKey: vipTypeKey ?? _vipTypeKey,
|
|
autoSub: autoSub ?? _autoSub,
|
|
size: size ?? _size,
|
|
orderCode: orderCode ?? _orderCode,
|
|
transactionId: transactionId ?? _transactionId,
|
|
serverVerificationData: serverVerificationData ?? _serverVerificationData,
|
|
productDetails: productDetails ?? _productDetails,
|
|
);
|
|
|
|
int? get id => _id;
|
|
|
|
String? get status => _status;
|
|
|
|
String? get price => _price;
|
|
|
|
int? get coins => _coins;
|
|
|
|
int? get sendCoins => _sendCoins;
|
|
|
|
String? get buyType => _buyType;
|
|
|
|
int? get sort => _sort;
|
|
|
|
String? get description => _description;
|
|
|
|
String? get vipType => _vipType;
|
|
|
|
String? get title => _title;
|
|
|
|
String? get brief => _brief;
|
|
|
|
String? get createdAt => _createdAt;
|
|
|
|
String? get originPrice => _originPrice;
|
|
|
|
String? get backhaulPrice => _backhaulPrice;
|
|
|
|
String? get iosTemplateId => _iosTemplateId;
|
|
|
|
String? get androidTemplateId => _androidTemplateId;
|
|
|
|
String? get currency => _currency;
|
|
|
|
String? get updatedAt => _updatedAt;
|
|
|
|
String? get translateKey => _translateKey;
|
|
|
|
String? get platform => _platform;
|
|
|
|
int? get langId => _langId;
|
|
|
|
String? get cornerMarker => _cornerMarker;
|
|
|
|
String? get firstPromotionPrice => _firstPromotionPrice;
|
|
|
|
int? get version => _version;
|
|
|
|
String? get userLevel => _userLevel;
|
|
|
|
int? get vipDays => _vipDays;
|
|
|
|
String? get userPromiseLevel => _userPromiseLevel;
|
|
|
|
int? get useOnce => _useOnce;
|
|
|
|
int? get sendCoinTtl => _sendCoinTtl;
|
|
|
|
int? get backhaulPercent => _backhaulPercent;
|
|
|
|
int? get payTemplateId => _payTemplateId;
|
|
|
|
String? get deletedAt => _deletedAt;
|
|
|
|
int? get payProductId => _payProductId;
|
|
|
|
ExtInfo? get extInfo => _extInfo;
|
|
|
|
String? get factor => _factor;
|
|
|
|
String? get shortType => _shortType;
|
|
|
|
String? get vipTypeKey => _vipTypeKey;
|
|
|
|
String? get autoSub => _autoSub;
|
|
|
|
String? get size => _size;
|
|
|
|
String? get orderCode => _orderCode;
|
|
|
|
String? get transactionId => _transactionId;
|
|
|
|
String? get serverVerificationData => _serverVerificationData;
|
|
|
|
ProductDetails? get productDetails => _productDetails;
|
|
|
|
// set方法补充
|
|
set id(int? value) => _id = value;
|
|
|
|
set status(String? value) => _status = value;
|
|
|
|
set price(String? value) => _price = value;
|
|
|
|
set coins(int? value) => _coins = value;
|
|
|
|
set sendCoins(int? value) => _sendCoins = value;
|
|
|
|
set buyType(String? value) => _buyType = value;
|
|
|
|
set sort(int? value) => _sort = value;
|
|
|
|
set description(String? value) => _description = value;
|
|
|
|
set vipType(String? value) => _vipType = value;
|
|
|
|
set title(String? value) => _title = value;
|
|
|
|
set brief(String? value) => _brief = value;
|
|
|
|
set createdAt(String? value) => _createdAt = value;
|
|
|
|
set originPrice(String? value) => _originPrice = value;
|
|
|
|
set backhaulPrice(String? value) => _backhaulPrice = value;
|
|
|
|
set iosTemplateId(String? value) => _iosTemplateId = value;
|
|
|
|
set androidTemplateId(String? value) => _androidTemplateId = value;
|
|
|
|
set currency(String? value) => _currency = value;
|
|
|
|
set updatedAt(String? value) => _updatedAt = value;
|
|
|
|
set translateKey(String? value) => _translateKey = value;
|
|
|
|
set platform(String? value) => _platform = value;
|
|
|
|
set langId(int? value) => _langId = value;
|
|
|
|
set cornerMarker(String? value) => _cornerMarker = value;
|
|
|
|
set firstPromotionPrice(String? value) => _firstPromotionPrice = value;
|
|
|
|
set version(int? value) => _version = value;
|
|
|
|
set userLevel(String? value) => _userLevel = value;
|
|
|
|
set vipDays(int? value) => _vipDays = value;
|
|
|
|
set userPromiseLevel(String? value) => _userPromiseLevel = value;
|
|
|
|
set useOnce(int? value) => _useOnce = value;
|
|
|
|
set sendCoinTtl(int? value) => _sendCoinTtl = value;
|
|
|
|
set backhaulPercent(int? value) => _backhaulPercent = value;
|
|
|
|
set payTemplateId(int? value) => _payTemplateId = value;
|
|
|
|
set deletedAt(String? value) => _deletedAt = value;
|
|
|
|
set payProductId(int? value) => _payProductId = value;
|
|
|
|
set extInfo(ExtInfo? value) => _extInfo = value;
|
|
|
|
set factor(String? value) => _factor = value;
|
|
|
|
set shortType(String? value) => _shortType = value;
|
|
|
|
set vipTypeKey(String? value) => _vipTypeKey = value;
|
|
|
|
set autoSub(String? value) => _autoSub = value;
|
|
|
|
set size(String? value) => _size = value;
|
|
|
|
set orderCode(String? value) => _orderCode = value;
|
|
|
|
set transactionId(String? value) => _transactionId = value;
|
|
|
|
set serverVerificationData(String? value) => _serverVerificationData = value;
|
|
|
|
set productDetails(ProductDetails? value) => _productDetails = value;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['id'] = _id;
|
|
map['status'] = _status;
|
|
map['price'] = _price;
|
|
map['coins'] = _coins;
|
|
map['send_coins'] = _sendCoins;
|
|
map['buy_type'] = _buyType;
|
|
map['sort'] = _sort;
|
|
map['description'] = _description;
|
|
map['vip_type'] = _vipType;
|
|
map['title'] = _title;
|
|
map['brief'] = _brief;
|
|
map['created_at'] = _createdAt;
|
|
map['origin_price'] = _originPrice;
|
|
map['backhaul_price'] = _backhaulPrice;
|
|
map['ios_template_id'] = _iosTemplateId;
|
|
map['android_template_id'] = _androidTemplateId;
|
|
map['currency'] = _currency;
|
|
map['updated_at'] = _updatedAt;
|
|
map['translate_key'] = _translateKey;
|
|
map['platform'] = _platform;
|
|
map['lang_id'] = _langId;
|
|
map['corner_marker'] = _cornerMarker;
|
|
map['first_promotion_price'] = _firstPromotionPrice;
|
|
map['version'] = _version;
|
|
map['user_level'] = _userLevel;
|
|
map['vip_days'] = _vipDays;
|
|
map['user_promise_level'] = _userPromiseLevel;
|
|
map['use_once'] = _useOnce;
|
|
map['send_coin_ttl'] = _sendCoinTtl;
|
|
map['backhaul_percent'] = _backhaulPercent;
|
|
map['pay_template_id'] = _payTemplateId;
|
|
map['deleted_at'] = _deletedAt;
|
|
map['pay_product_id'] = _payProductId;
|
|
if (_extInfo != null) {
|
|
map['ext_info'] = _extInfo?.toJson();
|
|
}
|
|
map['factor'] = _factor;
|
|
map['short_type'] = _shortType;
|
|
map['vip_type_key'] = _vipTypeKey;
|
|
map['auto_sub'] = _autoSub;
|
|
map['size'] = _size;
|
|
map['serverVerificationData'] = _serverVerificationData;
|
|
map['transactionId'] = _transactionId;
|
|
map['orderCode'] = _orderCode;
|
|
// map['productDetails'] = _productDetails;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
/// size : "small"
|
|
/// extra_coins : 0
|
|
/// max_total_coins : 0
|
|
/// max_total_coins_pop : 0
|
|
/// is_vip_show : false
|
|
/// receive_coins_rate : 85
|
|
/// extra_day_coins : 85
|
|
/// sub_coins_txt_list : ["",""]
|
|
/// backhaul_percent_conf : [{"episode_num":50,"backhaul_percent":50},{"episode_num":80,"backhaul_percent":80}]
|
|
|
|
ExtInfo extInfoFromJson(String str) => ExtInfo.fromJson(json.decode(str));
|
|
|
|
String extInfoToJson(ExtInfo data) => json.encode(data.toJson());
|
|
|
|
class ExtInfo {
|
|
ExtInfo({
|
|
String? size,
|
|
int? maxTotalCoins,
|
|
int? maxTotalCoinsPop,
|
|
int? extraCoins,
|
|
bool? isVipShow = false,
|
|
String? receiveCoinsRate,
|
|
int? extraDayCoins,
|
|
bool? coinsWinBackShow,
|
|
List<String>? subCoinsTxtList,
|
|
List<BackhaulPercentConf>? backhaulPercentConf,
|
|
}) {
|
|
_size = size;
|
|
_maxTotalCoins = maxTotalCoins;
|
|
_maxTotalCoinsPop = maxTotalCoinsPop;
|
|
_extraCoins = extraCoins;
|
|
_isVipShow = isVipShow;
|
|
_receiveCoinsRate = receiveCoinsRate;
|
|
_extraDayCoins = extraDayCoins;
|
|
_coinsWinBackShow = coinsWinBackShow;
|
|
_subCoinsTxtList = subCoinsTxtList;
|
|
_backhaulPercentConf = backhaulPercentConf;
|
|
}
|
|
|
|
ExtInfo.fromJson(dynamic json) {
|
|
_size = json['size'];
|
|
_maxTotalCoins = json['max_total_coins'];
|
|
_maxTotalCoinsPop = json['max_total_coins_pop'];
|
|
_isVipShow = json['is_vip_show'];
|
|
_receiveCoinsRate = json['receive_coins_rate'];
|
|
_extraDayCoins = json['extra_day_coins'];
|
|
_extraCoins = json['extra_coins'];
|
|
_coinsWinBackShow = json['coins_win_back_show'];
|
|
_subCoinsTxtList = json['sub_coins_txt_list'] != null ? json['sub_coins_txt_list'].cast<String>() : [];
|
|
if (json['backhaul_percent_conf'] != null) {
|
|
_backhaulPercentConf = [];
|
|
json['backhaul_percent_conf'].forEach((v) {
|
|
_backhaulPercentConf?.add(BackhaulPercentConf.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
String? _size;
|
|
int? _extraCoins;
|
|
int? _maxTotalCoins;
|
|
int? _maxTotalCoinsPop;
|
|
String? _receiveCoinsRate;
|
|
int? _extraDayCoins;
|
|
bool? _isVipShow;
|
|
bool? _coinsWinBackShow;
|
|
List<String>? _subCoinsTxtList;
|
|
List<BackhaulPercentConf>? _backhaulPercentConf;
|
|
|
|
ExtInfo copyWith({
|
|
String? size,
|
|
int? extraCoins,
|
|
int? maxTotalCoins,
|
|
int? maxTotalCoinsPop,
|
|
String? receiveCoinsRate,
|
|
int? extraDayCoins,
|
|
bool? coinsWinBackShow,
|
|
bool? isVipShow,
|
|
List<String>? subCoinsTxtList,
|
|
List<BackhaulPercentConf>? backhaulPercentConf,
|
|
}) => ExtInfo(
|
|
size: size ?? _size,
|
|
maxTotalCoins: maxTotalCoins ?? _maxTotalCoins,
|
|
maxTotalCoinsPop: maxTotalCoinsPop ?? _maxTotalCoinsPop,
|
|
receiveCoinsRate: receiveCoinsRate ?? _receiveCoinsRate,
|
|
extraDayCoins: extraDayCoins ?? _extraDayCoins,
|
|
isVipShow: isVipShow ?? _isVipShow,
|
|
extraCoins: extraCoins ?? _extraCoins,
|
|
coinsWinBackShow: coinsWinBackShow ?? _coinsWinBackShow,
|
|
subCoinsTxtList: subCoinsTxtList ?? _subCoinsTxtList,
|
|
backhaulPercentConf: backhaulPercentConf ?? _backhaulPercentConf,
|
|
);
|
|
|
|
String? get size => _size;
|
|
|
|
int? get extraCoins => _extraCoins;
|
|
|
|
int? get maxTotalCoins => _maxTotalCoins;
|
|
|
|
int? get maxTotalCoinsPop => _maxTotalCoinsPop;
|
|
|
|
String? get receiveCoinsRate => _receiveCoinsRate;
|
|
|
|
int? get extraDayCoins => _extraDayCoins;
|
|
|
|
bool? get coinsWinBackShow => _coinsWinBackShow;
|
|
|
|
bool? get isVipShow => _isVipShow;
|
|
|
|
List<String>? get subCoinsTxtList => _subCoinsTxtList;
|
|
|
|
List<BackhaulPercentConf>? get backhaulPercentConf => _backhaulPercentConf;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['size'] = _size;
|
|
map['max_total_coins'] = _maxTotalCoins;
|
|
map['max_total_coins_pop'] = _maxTotalCoinsPop;
|
|
map['receive_coins_rate'] = _receiveCoinsRate;
|
|
map['extra_day_coins'] = _extraDayCoins;
|
|
map['is_vip_show'] = _isVipShow;
|
|
map['extra_coins'] = _extraCoins;
|
|
map['coins_win_back_show'] = _coinsWinBackShow;
|
|
map['sub_coins_txt_list'] = _subCoinsTxtList;
|
|
if (_backhaulPercentConf != null) {
|
|
map['backhaul_percent_conf'] = _backhaulPercentConf?.map((v) => v.toJson()).toList();
|
|
}
|
|
return map;
|
|
}
|
|
}
|
|
|
|
/// episode_num : 50
|
|
/// backhaul_percent : 50
|
|
|
|
BackhaulPercentConf backhaulPercentConfFromJson(String str) => BackhaulPercentConf.fromJson(json.decode(str));
|
|
|
|
String backhaulPercentConfToJson(BackhaulPercentConf data) => json.encode(data.toJson());
|
|
|
|
class BackhaulPercentConf {
|
|
BackhaulPercentConf({int? episodeNum, int? backhaulPercent}) {
|
|
_episodeNum = episodeNum;
|
|
_backhaulPercent = backhaulPercent;
|
|
}
|
|
|
|
BackhaulPercentConf.fromJson(dynamic json) {
|
|
_episodeNum = json['episode_num'];
|
|
_backhaulPercent = json['backhaul_percent'];
|
|
}
|
|
|
|
int? _episodeNum;
|
|
int? _backhaulPercent;
|
|
|
|
BackhaulPercentConf copyWith({int? episodeNum, int? backhaulPercent}) =>
|
|
BackhaulPercentConf(episodeNum: episodeNum ?? _episodeNum, backhaulPercent: backhaulPercent ?? _backhaulPercent);
|
|
|
|
int? get episodeNum => _episodeNum;
|
|
|
|
int? get backhaulPercent => _backhaulPercent;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['episode_num'] = _episodeNum;
|
|
map['backhaul_percent'] = _backhaulPercent;
|
|
return map;
|
|
}
|
|
}
|
|
|