package org.example.petshopdesktop.models;

import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

public class Category {
    private SimpleIntegerProperty categoryId;
    private SimpleStringProperty categoryName;
    private SimpleStringProperty categoryType;

    //Constrctor
    public Category(int categoryId, String categoryName, String categoryType) {
        this.categoryId = new SimpleIntegerProperty(categoryId);
        this.categoryName = new SimpleStringProperty(categoryName);
        this.categoryType = new SimpleStringProperty(categoryType);
    }

    //getters and setters
    public int getCategoryId() {
        return categoryId.get();
    }

    public SimpleIntegerProperty categoryIdProperty() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId.set(categoryId);
    }

    public String getCategoryName() {
        return categoryName.get();
    }

    public SimpleStringProperty categoryNameProperty() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName.set(categoryName);
    }

    public String getCategoryType() {
        return categoryType.get();
    }

    public SimpleStringProperty categoryTypeProperty() {
        return categoryType;
    }

    public void setCategoryType(String categoryType) {
        this.categoryType.set(categoryType);
    }

    @Override
    public String toString() {
        return getCategoryName();
    }
}
