import 'package:json_annotation/json_annotation.dart'; 
  
part 'upload_img_secret_key.g.dart';


@JsonSerializable()
  class UploadImgSecretKey extends Object {

  @JsonKey(name: 'account')
  String? account;

  @JsonKey(name: 'bucketName')
  String? bucketName;

  @JsonKey(name: 'endPoint')
  int? endPoint;

  @JsonKey(name: 'ip')
  String? ip;

  @JsonKey(name: 'password')
  String? password;

  @JsonKey(name: 'imgSecretKey')
  bool? imgSecretKey;

  // 是否打开工具
  bool annotationSwitch;

  UploadImgSecretKey({this.account,this.bucketName,this.endPoint,this.ip,this.password,this.imgSecretKey,this.annotationSwitch = false});

  factory UploadImgSecretKey.fromJson(Map<String, dynamic> srcJson) => _$UploadImgSecretKeyFromJson(srcJson);

  Map<String, dynamic> toJson() => _$UploadImgSecretKeyToJson(this);
  
}


/// 返回结果文件实体类
@JsonSerializable()
class FileResult extends Object{
  String? path; // 本地相对地址
  String? url; // 图片上传返回url地址
  dynamic? otherParam;
  String myObject; // 我的项目名称
  bool success; // 是否成功
 

  FileResult({required this.myObject, this.url, this.success = false,this.otherParam});



  factory FileResult.fromJson(Map<String, dynamic> srcJson) => _$FileResultFromJson(srcJson);

  Map<String, dynamic> toJson() => _$FileResultToJson(this);
}
  
