自习室优化ok
This commit is contained in:
47
lib/request/dto/common/version_dto.dart
Normal file
47
lib/request/dto/common/version_dto.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
class VersionDto {
|
||||
VersionDto({
|
||||
required this.latestVersion,
|
||||
required this.updatedAt,
|
||||
required this.downloadUrl,
|
||||
required this.updateContent,
|
||||
required this.createdAt,
|
||||
required this.lowVersion,
|
||||
required this.id,
|
||||
required this.downloadSize,
|
||||
required this.platform,
|
||||
});
|
||||
|
||||
String latestVersion;
|
||||
DateTime updatedAt;
|
||||
String downloadUrl;
|
||||
List<String> updateContent;
|
||||
DateTime createdAt;
|
||||
String lowVersion;
|
||||
int id;
|
||||
String downloadSize;
|
||||
int platform;
|
||||
|
||||
factory VersionDto.fromJson(Map<dynamic, dynamic> json) => VersionDto(
|
||||
latestVersion: json["latest_version"],
|
||||
updatedAt: DateTime.parse(json["updated_at"]),
|
||||
downloadUrl: json["download_url"],
|
||||
updateContent: List<String>.from(json["update_content"].map((x) => x)),
|
||||
createdAt: DateTime.parse(json["created_at"]),
|
||||
lowVersion: json["low_version"],
|
||||
id: json["id"],
|
||||
downloadSize: json["download_size"],
|
||||
platform: json["platform"],
|
||||
);
|
||||
|
||||
Map<dynamic, dynamic> toJson() => {
|
||||
"latest_version": latestVersion,
|
||||
"updated_at": updatedAt.toIso8601String(),
|
||||
"download_url": downloadUrl,
|
||||
"update_content": List<dynamic>.from(updateContent.map((x) => x)),
|
||||
"created_at": createdAt.toIso8601String(),
|
||||
"low_version": lowVersion,
|
||||
"id": id,
|
||||
"download_size": downloadSize,
|
||||
"platform": platform,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user