package com.fxy.realm;

import android.os.Parcel;
import android.os.Parcelable;

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

public class HkTransRealm extends RealmObject implements Parcelable {
    @PrimaryKey // 必须要有一个主键
    public String batch ;
    public String path ;
    public int  version ;
    public String  filename;

    public HkTransRealm(){

    }
    protected HkTransRealm(Parcel in) {
        batch = in.readString();
        path = in.readString();
        version = in.readInt();
        filename = in.readString();
    }



    public static Creator<HkTransRealm> getCREATOR() {
        return CREATOR;
    }

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

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

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

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(batch);
        parcel.writeString(path);
        parcel.writeInt(version);
        parcel.writeString(filename);
    }

    public String getBatch() {
        return batch;
    }

    public void setBatch(String batch) {
        this.batch = batch;
    }

    public String getPath() {
        return path;
    }

    public HkTransRealm setPath(String path) {
        this.path = path;
        return this;
    }

    public int getVersion() {
        return version;
    }

    public HkTransRealm setVersion(int version) {
        this.version = version;
        return this;
    }

    public String getFilename() {
        return filename;
    }

    public HkTransRealm setFilename(String filename) {
        this.filename = filename;
        return this;
    }
}
