|  |  | 
 |  |  | package com.dayu.pipirrapp.bean.net; | 
 |  |  |  | 
 |  |  | import java.io.File; | 
 |  |  | import com.dayu.pipirrapp.net.BaseResponse; | 
 |  |  | import com.luck.picture.lib.entity.LocalMedia; | 
 |  |  |  | 
 |  |  | import retrofit2.Call; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * Copyright (C), 2023, | 
 |  |  | 
 |  |  |  * Date: 2023-04-15 8:15 | 
 |  |  |  * Description: | 
 |  |  |  */ | 
 |  |  | public class UplodFileState { | 
 |  |  |     int state = 0;//0正在上传 1上传完成 2上传失败 | 
 |  |  |     File file;//上传的文件 | 
 |  |  |     String url;//上传文件后返回的url | 
 |  |  |     int number;//失败后重试的次数 | 
 |  |  | public class UplodFileState extends LocalMedia { | 
 |  |  |     //正在上传 | 
 |  |  |     public final static int STATE_UPDING = 0; | 
 |  |  |     //上传完成 | 
 |  |  |     public final static int STATE_DONE = 1; | 
 |  |  |     //上传失败 | 
 |  |  |     public final static int STATE_ERROR = 2; | 
 |  |  |     //图片类型 | 
 |  |  |     public final static int IMG_TYPE = 1; | 
 |  |  |     //视频类型 | 
 |  |  |     public final static int VIDEO_TYPE = 2; | 
 |  |  |  | 
 |  |  |     //0正在上传 1上传完成 2上传失败 | 
 |  |  |     int state = 0; | 
 |  |  |     //上传的文件 | 
 |  |  |     String filePath; | 
 |  |  |     //失败后重试的次数 | 
 |  |  |     int number; | 
 |  |  |     //上传后的id | 
 |  |  |     String postId; | 
 |  |  |     //上传后的地址 | 
 |  |  |     String webPath; | 
 |  |  |     //当前请求 | 
 |  |  |     Call<BaseResponse> thisCall; | 
 |  |  |     //图片上传进度 | 
 |  |  |     int progress; | 
 |  |  |     //adapter中的position | 
 |  |  |     int adapterPosition = -1; | 
 |  |  |     //上传类型 | 
 |  |  |     int uploadType; | 
 |  |  |     //扩展名 | 
 |  |  |     String extName; | 
 |  |  |  | 
 |  |  |     public String getExtName() { | 
 |  |  |         return extName; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setExtName(String extName) { | 
 |  |  |         this.extName = extName; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public int getUploadType() { | 
 |  |  |         return uploadType; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setUploadType(int uploadType) { | 
 |  |  |         this.uploadType = uploadType; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public int getAdapterPosition() { | 
 |  |  |         return adapterPosition; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setAdapterPosition(int adapterPosition) { | 
 |  |  |         this.adapterPosition = adapterPosition; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public int getProgress() { | 
 |  |  |         return progress; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setProgress(int progress) { | 
 |  |  |         this.progress = progress; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     public Call<BaseResponse> getThisCall() { | 
 |  |  |         return thisCall; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setThisCall(Call<BaseResponse> thisCall) { | 
 |  |  |         this.thisCall = thisCall; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public int getNumber() { | 
 |  |  |         return number; | 
 |  |  | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public UplodFileState(File file) { | 
 |  |  |         this.file = file; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public int getState() { | 
 |  |  |         return state; | 
 |  |  |     } | 
 |  |  | 
 |  |  |         this.state = state; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public File getFile() { | 
 |  |  |         return file; | 
 |  |  |     public String getFilePath() { | 
 |  |  |         return filePath; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setFile(File file) { | 
 |  |  |         this.file = file; | 
 |  |  |     public void setFilePath(String filePath) { | 
 |  |  |         this.filePath = filePath; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getUrl() { | 
 |  |  |         return url; | 
 |  |  |     public String getPostId() { | 
 |  |  |         return postId; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setUrl(String url) { | 
 |  |  |         this.url = url; | 
 |  |  |     public void setPostId(String postId) { | 
 |  |  |         this.postId = postId; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String getWebPath() { | 
 |  |  |         return webPath; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void setWebPath(String webPath) { | 
 |  |  |         this.webPath = webPath; | 
 |  |  |     } | 
 |  |  | } |