package com.fxy.realm;

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

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

public class HkTransDetailRealm  extends RealmObject implements Parcelable {
    @PrimaryKey // 必须要有一个主键
    private String id;
    public String tracking_number= ""  ;
    public String batch_number="" ;
    public String sort = "" ;
    public int scans_number = 0;
    public String scans_time = "";
    public int push_status = 0;
    public int  version = 0 ;


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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.tracking_number);
        dest.writeString(this.batch_number);
        dest.writeString(this.sort);
        dest.writeInt(this.scans_number);
        dest.writeString(this.scans_time);
        dest.writeInt(this.push_status);
        dest.writeInt(this.version);
    }

    public void readFromParcel(Parcel source) {
        this.id = source.readString();
        this.tracking_number = source.readString();
        this.batch_number = source.readString();
        this.sort = source.readString();
        this.scans_number = source.readInt();
        this.scans_time = source.readString();
        this.push_status = source.readInt();
        this.version = source.readInt();
    }

    public HkTransDetailRealm() {
    }

    protected HkTransDetailRealm(Parcel in) {
        this.id = in.readString();
        this.tracking_number = in.readString();
        this.batch_number = in.readString();
        this.sort = in.readString();
        this.scans_number = in.readInt();
        this.scans_time = in.readString();
        this.push_status = in.readInt();
        this.version = in.readInt();
    }

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

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

    public String getId() {
        return id;
    }

    public HkTransDetailRealm setId(String id) {
        this.id = id;
        return this;
    }

    public String getTrackingNumber() {
        return tracking_number;
    }

    public HkTransDetailRealm setTrackingNumber(String tracking_number) {
        this.tracking_number = tracking_number;
        return this;
    }

    public String getBatchNumber() {
        return batch_number;
    }

    public HkTransDetailRealm setBatchNumber(String batch_number) {
        this.batch_number = batch_number;
        return this;
    }

    public String getSort() {
        return sort;
    }

    public HkTransDetailRealm setSort(String sort) {
        this.sort = sort;
        return this;
    }

    public int getScansNumber() {
        return scans_number;
    }

    public HkTransDetailRealm setScansNumber(int scans_number) {
        this.scans_number = scans_number;
        return this;
    }

    public String getScansTime() {
        return scans_time;
    }

    public HkTransDetailRealm setScansTime(String scans_time) {
        this.scans_time = scans_time;
        return this;
    }

    public int getPush_status() {
        return push_status;
    }

    public HkTransDetailRealm setPushStatus(int push_status) {
        this.push_status = push_status;
        return this;
    }

    public int getVersion() {
        return version;
    }

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