package com.mvc.model.produce;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.List;

public class FilterDataModel implements java.io.Serializable{
    private String title;
    private String key;
    private Boolean multiple;
    private List<Option> options;

    @JsonIgnore
    private Integer order;

    public FilterDataModel() {
    }

    public FilterDataModel(DicProductionPartModel model){
        this.title = model.getPartName();
        this.key = model.getId().toString();
        this.multiple = false;
        this.order = model.getViewOrder();
    }

    public String getTitle() {
        return title;
    }

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

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Boolean getMultiple() {
        return multiple;
    }

    public void setMultiple(Boolean multiple) {
        this.multiple = multiple;
    }

    public List<Option> getOptions() {
        return options;
    }

    public void setOptions(List<Option> options) {
        this.options = options;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public static class Option {
        private String value;
        private String label;
        private String icon;
        private String image;

        @JsonIgnore
        private Integer order;

        public String getValue() {
            return value;
        }

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

        public String getLabel() {
            return label;
        }

        public void setLabel(String label) {
            this.label = label;
        }

        public String getIcon() {
            return icon;
        }

        public void setIcon(String icon) {
            this.icon = icon;
        }

        public String getImage() {
            return image;
        }

        public void setImage(String image) {
            this.image = image;
        }

        public Integer getOrder() {
            return order;
        }

        public void setOrder(Integer order) {
            this.order = order;
        }
    }
}
