74 lines
1.6 KiB
Dart
74 lines
1.6 KiB
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
import 'package:pj_supermarket_cloud/common/index.dart';
|
|
|
|
part 'app_api_models.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class ServiceAppVersion {
|
|
/// 唯一标识符
|
|
final String? id;
|
|
|
|
/// app唯一编码
|
|
final String? appUniqueCode;
|
|
|
|
/// 平台
|
|
final String? platform;
|
|
|
|
/// 内部版本号
|
|
final int? versionCode;
|
|
|
|
/// 版本名称
|
|
final String? versionName;
|
|
|
|
/// 更新内容/更新日志
|
|
final String? updateContent;
|
|
|
|
/// 安装包下载地址(wgt、apk)
|
|
final String? downloadUrl;
|
|
|
|
/// 是否强制更新
|
|
@JsonKey(fromJson: JsonTool.stringToBoolean, toJson: JsonTool.booleanToString)
|
|
final bool? isForce;
|
|
|
|
/// 是否静默更新(WGT用)
|
|
@JsonKey(fromJson: JsonTool.stringToBoolean, toJson: JsonTool.booleanToString)
|
|
final bool? isSilent;
|
|
|
|
/// 状态(已发布、未发布、已下架)
|
|
final String? status;
|
|
|
|
ServiceAppVersion({
|
|
this.id,
|
|
this.appUniqueCode,
|
|
this.platform,
|
|
this.versionCode,
|
|
this.versionName,
|
|
this.updateContent,
|
|
this.downloadUrl,
|
|
this.isForce,
|
|
this.isSilent,
|
|
this.status,
|
|
});
|
|
|
|
factory ServiceAppVersion.fromJson(Map<String, dynamic> json) =>
|
|
_$ServiceAppVersionFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$ServiceAppVersionToJson(this);
|
|
}
|
|
|
|
@JsonSerializable()
|
|
class ServiceAppVersionPage extends ServicePageBase {
|
|
List<ServiceAppVersion>? records;
|
|
|
|
ServiceAppVersionPage({
|
|
this.records,
|
|
});
|
|
|
|
factory ServiceAppVersionPage.fromJson(Map<String, dynamic> json) =>
|
|
_$ServiceAppVersionPageFromJson(
|
|
json,
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => _$ServiceAppVersionPageToJson(this);
|
|
}
|