import 'package:json_annotation/json_annotation.dart'; import '../config/request_config.dart'; part 'app_version.g.dart'; @JsonSerializable() class AppVersion extends Object { // @JsonKey(name: 'id') // String id; // @JsonKey(name: 'creatorId') // int creatorId; // @JsonKey(name: 'creatorName') // String creatorName; // @JsonKey(name: 'creationTime') // String creationTime; @JsonKey(name: 'appName') String appName; @JsonKey(name: 'version') String version; @JsonKey(name: 'ftuType') int ftuType; @JsonKey(name: 'appFileUrl') String? appFileUrl; @JsonKey(name: 'description') String? description; AppVersion( // this.id, // this.creatorId, // this.creatorName, // this.creationTime, this.appName, this.version, this.ftuType, this.appFileUrl, this.description, ) { if (appFileUrl != null) appFileUrl = RequestConfig.imgUrl + appFileUrl!; } factory AppVersion.fromJson(Map srcJson) => _$AppVersionFromJson(srcJson); Map toJson() => _$AppVersionToJson(this); }