package com.phlx.anchorcollect.entity;

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

import androidx.databinding.BaseObservable;

public class UIParamEntity extends BaseObservable implements Parcelable {

    // 0-15 性状  16 备注 100照片
    private int id;

    private String title;

    private String name;

    private String value;

    // 0 暂无项目 1数字  2文字  3日期  4spinner 5照片
    private int type;

    //字典项里过滤
    private String dictType;

    public UIParamEntity() {
    }

    public UIParamEntity(int id, String title, String name, String value, int type, String dictType) {
        this.id = id;
        this.title = title;
        this.name = name;
        this.value = value;
        this.type = type;
        this.dictType = dictType;
    }

    protected UIParamEntity(Parcel in) {
        id = in.readInt();
        title = in.readString();
        name = in.readString();
        value = in.readString();
        type = in.readInt();
        dictType = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(title);
        dest.writeString(name);
        dest.writeString(value);
        dest.writeInt(type);
        dest.writeString(dictType);
    }

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

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

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

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    @Override
    public String toString() {
        return "UIParamEntity{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", name='" + name + '\'' +
                ", value='" + value + '\'' +
                ", type=" + type +
                ", dictType='" + dictType + '\'' +
                '}';
    }
}
