package com.unibuy.smartdevice.structure;

public class ProductStructure {
    private String productID;
    private String productImg;
    private String productName;
    private int machinePrice;
    private int sellingPrice;
    private int memberPrice;
    private int slotUpperLimit;
    private String marketingPlan;
    private String materialCode;
    private String productNameEn;
    private String productNameJp;

    public ProductStructure(String productID, String productImg, String productName, int machinePrice, int sellingPrice, int memberPrice, int slotUpperLimit, String marketingPlan, String materialCode,String productNameEn,String productNameJp) {
        this.productID = productID;
        this.productImg = productImg;
        this.productName = productName;
        this.machinePrice = machinePrice;
        this.sellingPrice = sellingPrice;
        this.memberPrice = memberPrice;
        this.slotUpperLimit = slotUpperLimit;
        this.marketingPlan = marketingPlan;
        this.materialCode = materialCode;
        this.productNameEn = productNameEn;
        this.productNameJp = productNameJp;
    }

    public String getProductID() {
        return this.productID;
    }

    public void setProductID(String productID) {
        this.productID = productID;
    }

    public String getProductImg() {
        return this.productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg;
    }

    public String getProductName() {
        return this.productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public int getMachinePrice() {
        return this.machinePrice;
    }

    public void setMachinePrice(int machinePrice) {
        this.machinePrice = machinePrice;
    }

    public int getSellingPrice() {
        return sellingPrice;
    }

    public void setSellingPrice(int sellingPrice) {
        this.sellingPrice = sellingPrice;
    }

    public int getMemberPrice() {
        return this.memberPrice;
    }

    public void setMemberPrice(int memberPrice) {
        this.memberPrice = memberPrice;
    }

    public int getSlotUpperLimit() {
        return this.slotUpperLimit;
    }

    public void setSlotUpperLimit(int slotUpperLimit) {
        this.slotUpperLimit = slotUpperLimit;
    }

    public String getMarketingPlan() {
        return this.marketingPlan;
    }

    public void setMarketingPlan(String marketingPlan) {
        this.marketingPlan = marketingPlan;
    }

    public String getMaterialCode() {
        return materialCode;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    public String getProductNameEn() {
        return productNameEn;
    }

    public void setProductNameEn(String productNameEn) {
        this.productNameEn = productNameEn;
    }

    public String getProductNameJp() {
        return productNameJp;
    }

    public void setProductNameJp(String productNameJp) {
        this.productNameJp = productNameJp;
    }

    public int getRealPrice() {
        int machinePrice = getMachinePrice();
        int sellingPrice = getSellingPrice();
        int memberPrice = getMemberPrice();
        int price = machinePrice > 0 ? machinePrice : sellingPrice;
        return price;
    }

    @Override
    public String toString() {
        return "ProductStructure {" +
                "productID='" + productID + '\'' +
                ", productImg='" + productImg + '\'' +
                ", productName='" + productName + '\'' +
                ", machinePrice=" + machinePrice +
                ", sellingPrice=" + sellingPrice +
                ", memberPrice=" + memberPrice +
                ", slotUpperLimit=" + slotUpperLimit +
                ", marketingPlan='" + marketingPlan + '\'' +
                ", materialCode='" + materialCode + '\'' +
                ", productNameEn='" + productNameEn + '\'' +
                ", productNameJp='" + productNameJp + '\'' +
                '}';
    }
}
