import 'package:wow_english/generated/json/base/json_field.dart'; import 'dart:convert'; import '../generated/json/app_config_entity.g.dart'; @JsonSerializable() class AppConfigEntityEntity { // 安卓是否强制更新 bool? androidForceUpdate; // 安卓是否推荐更新 bool? androidRecommendUpdate; // 安卓更新包地址 String? androidUpdatePackageUrl; // 安卓当前版本号 int? androidVersion; bool? iosForceUpdate; bool? iosRecommendUpdate; // ios版本 int? iosVersion; // 购前须知图片 String? noticeBeforePurchaseUrl; // 当前是否安全,safe-安全 otherwise-隐藏pay String? safe; AppConfigEntityEntity(); factory AppConfigEntityEntity.fromJson(Map json) => $AppConfigEntityEntityFromJson(json); Map toJson() => $AppConfigEntityEntityToJson(this); @override String toString() { return jsonEncode(this); } // 是否审核中(null或者非"safe"即不安全) bool isAppReviewing() { return safe != "safe"; } }