123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- import 'liveConsultation.m.dart';
- class StorageRequest {
- List<int>? file;
- String? authorization;
- StorageRequest({
- this.file,
- this.authorization,
- });
- factory StorageRequest.fromJson(Map<String, dynamic> map) {
- final fileData = map['File'];
- return StorageRequest(
- file: fileData != null ? (fileData as List).map((e) => e as int).toList(): null,
- authorization: map['Authorization'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(file != null)
- map['File'] = file;
- if(authorization != null)
- map['Authorization'] = authorization;
- return map;
- }
- }
- class StorageServiceSettingDTO {
- String? authorization;
- String? contentType;
- String? storageUrl;
- StorageServiceSettingDTO({
- this.authorization,
- this.contentType,
- this.storageUrl,
- });
- factory StorageServiceSettingDTO.fromJson(Map<String, dynamic> map) {
- return StorageServiceSettingDTO(
- authorization: map['Authorization'],
- contentType: map['ContentType'],
- storageUrl: map['StorageUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(authorization != null)
- map['Authorization'] = authorization;
- if(contentType != null)
- map['ContentType'] = contentType;
- if(storageUrl != null)
- map['StorageUrl'] = storageUrl;
- return map;
- }
- }
- class FileServiceRequest extends TokenRequest{
- String? fileName;
- bool isRechristen;
- bool isUpgradePackage;
- FileServiceRequest({
- this.fileName,
- this.isRechristen = false,
- this.isUpgradePackage = false,
- String? token,
- }) : super(
- token: token,
- );
- factory FileServiceRequest.fromJson(Map<String, dynamic> map) {
- return FileServiceRequest(
- fileName: map['FileName'],
- isRechristen: map['IsRechristen'],
- isUpgradePackage: map['IsUpgradePackage'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(fileName != null)
- map['FileName'] = fileName;
- map['IsRechristen'] = isRechristen;
- map['IsUpgradePackage'] = isUpgradePackage;
- return map;
- }
- }
- class CheckStorageRequest {
- String? fileName;
- CheckStorageRequest({
- this.fileName,
- });
- factory CheckStorageRequest.fromJson(Map<String, dynamic> map) {
- return CheckStorageRequest(
- fileName: map['FileName'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(fileName != null)
- map['FileName'] = fileName;
- return map;
- }
- }
|