package object.itemmanager;

import object.itemmanager.ItemApp;

public class ProductApp extends ItemApp {

    private String idSP;
    private String nameSP;
    private int priceSP;
    private boolean activeSP;

    public ProductApp() {
    }

    public ProductApp(String idSP, String nameSP, int priceSP) {
        this.idSP = idSP;
        this.nameSP = nameSP;
        this.priceSP = priceSP;
    }

    public ProductApp(String idSP, String nameSP, int priceSP, String id, String name, boolean active) {
        super(id, name, active);
        this.idSP = idSP;
        this.nameSP = nameSP;
        this.priceSP = priceSP;
    }

    public String getIdSP() {
        return idSP;
    }

    public void setIdSP(String idSP) {
        this.idSP = idSP;
    }

    public String getNameSP() {
        return nameSP;
    }

    public void setNameSP(String nameSP) {
        this.nameSP = nameSP;
    }

    public int getPriceSP() {
        return priceSP;
    }

    public void setPriceSP(int priceSP) {
        this.priceSP = priceSP;
    }

    public boolean isActiveSP() {
        return activeSP;
    }

    public void setActiveSP(boolean activeSP) {
        this.activeSP = activeSP;
    }

    @Override
    public String toString() {
        return super.toString()+", ProductApp{" + "idSP=" + idSP + ", nameSP=" + nameSP + ", priceSP=" + priceSP + ", activeSP=" + activeSP + '}';
    }



    @Override
    public String[] toArray() {
        return new String[]{super.getId(), super.getName(), idSP, nameSP, priceSP + "", activeSP ? "Kích hoạt" : "Ẩn"};
    }
}
