package com.fxy.putIn.bean.realm;

import android.os.Parcel;
import android.os.Parcelable;
import io.realm.Realm;
import com.luck.picture.lib.entity.LocalMedia;

import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;

public class TakePhotosRealm  extends RealmObject implements Parcelable {
    @PrimaryKey // 必须要有一个主键
    private String id ;//
    private String localPath = "";//本地文件路径
    private String ossUrl ="";//OSS文件路径
    private String scanDate = ""; //扫描时间
    private Integer mimeType = 0; //文件类
    private Integer isDelete = 0; //是否删除
    private Integer pushStatus = 0; //状态 0 -未推送 1 - 推送失败;  2 - 推送成功
    private Integer rePush = 0; //重推次数
    private Integer isFinish=0; // 是否完成 0未完成【】  1已完成 【已上传】 2上传失败
    private Long createTime;
    public TakePhotosRealm() {
    }
    protected TakePhotosRealm(Parcel in) {
        this.id = in.readString();
        this.localPath = in.readString();
        this.ossUrl = in.readString();
        this.scanDate = in.readString();
        this.mimeType = in.readInt();
        this.isDelete = in.readInt();
        this.pushStatus = in.readInt();
        this.rePush = in.readInt();
        this.isFinish = in.readInt();
        this.createTime = in.readLong();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.localPath);
        dest.writeString(this.ossUrl);
        dest.writeString(this.scanDate);
        dest.writeInt(this.mimeType);
        dest.writeInt(this.isDelete);
        dest.writeInt(this.pushStatus);
        dest.writeInt(this.rePush);
        dest.writeInt(this.isFinish);
        dest.writeLong(this.createTime);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Parcelable.Creator<TakePhotosRealm> CREATOR = new Parcelable.Creator<TakePhotosRealm>() {
        @Override
        public TakePhotosRealm createFromParcel(Parcel in) {
            return new TakePhotosRealm(in);
        }

        @Override
        public TakePhotosRealm[] newArray(int size) {
            return new TakePhotosRealm[size];
        }
    };



    public void  setLocalPath(String localPath){
        this.localPath = localPath;
    }
    public void  setOssUrl(String ossUrl){
        this.ossUrl = ossUrl;
    }
    public void  setScanDate(String scanDate){
        this.scanDate = scanDate;
    }
    public void  setMimeType(Integer mimeType){
        this.mimeType = mimeType;
    }
    public void  setPushStatus(Integer pushStatus){
        this.pushStatus = pushStatus;
    }
    public void  setIsDelete(Integer isDelete){
        this.isDelete = isDelete;
    }
    public void  setRePush(Integer rePush){
        this.rePush = rePush;
    }
    public void  setIsFinish(Integer isFinish){
        this.isFinish = isFinish;
    }
    public void  setCreateTime(Long createTime){
        this.createTime = createTime;
    }

    public String getId(){
        return this.id;
    }
    public String getLocalPath(){
        return this.localPath;
    }

    public String getOssUrl(){
        return this.ossUrl;
    }
    public String getScanDate(){
        return this.scanDate;
    }
    public Integer getPushStatus(){
        return this.pushStatus;
    }


    public Integer getRePush(){
        return this.rePush;
    }
    public Integer getIsFinish(){
        return  this.isFinish;
    }
    public Integer getMimeType(){
        return  this.mimeType;
    }
    public Long getCreateTime(){
        return  this.createTime;
    }
}
