package com.unibuy.smartdevice.structure;

import org.json.JSONObject;

public class MarketingPlanStructure {
    private int field;
    private int slot;
    private ProductStructure product;
    private int count;
    private boolean lock;
    private JSONObject otherData;
    private boolean isMarketingPlan;

    public MarketingPlanStructure(int field, int slot, ProductStructure product, int count, JSONObject otherData) {
        this.field = field;
        this.slot = slot;
        this.product = product;
        this.count = count;
        this.otherData = otherData;
    }

    @Override
    public String toString() {
        return "SlotStructure{" +
                "field=" + field +
                ", slot=" + slot +
                ", product=" + (product != null ? product.toString() : "null") +
                ", count=" + count +
                ", lock=" + lock +
                ", isMarketingPlan=" + isMarketingPlan +
                ", otherData=" + (otherData != null ? otherData.toString() : "{}") +
                '}';
    }

    public MarketingPlanStructure(int field, int slot, ProductStructure product, int count) {
        this(field, slot, product, count, new JSONObject());
    }

    public int getField() {
        return field;
    }

    public void setField(int field) {
        this.field = field;
    }

    public int getSlot() {
        return this.slot;
    }
    public void setSlot(int slot) {
        this.slot = slot;
    }

    public int getCount() {
        return count;
    }
    public void setCount(int count) {
        this.count = count;
    }

    public boolean isMarketingPlan() {
        return isMarketingPlan;
    }

    public void setMarketingPlan(boolean marketingPlan) {
        isMarketingPlan = marketingPlan;
    }

    public boolean isLock() {
        return lock;
    }
    public void setLock(boolean lock) {
        this.lock = lock;
    }

    public ProductStructure getProduct() {
        return this.product;
    }
    public void setProduct(ProductStructure product) {
        this.product = product;
    }

    public JSONObject getOtherData() {
        return otherData;
    }

    public void setOtherData(JSONObject otherData) {
        this.otherData = otherData;
    }
}
