package org.example.petshopdesktop.models;

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

public class Pet {
    private SimpleIntegerProperty petId;
    private SimpleStringProperty petName;
    private SimpleStringProperty petSpecies;
    private SimpleStringProperty petBreed;
    private SimpleIntegerProperty petAge;
    private SimpleStringProperty petStatus;
    private SimpleDoubleProperty petPrice;
    private SimpleStringProperty imageUrl;
    private SimpleStringProperty customerName = new SimpleStringProperty("");
    private SimpleStringProperty storeName = new SimpleStringProperty("");
    private long customerId = 0L;
    private long storeId = 0L;

    public Pet(int petId, String petName, String petSpecies, String petBreed, int petAge, String petStatus, double petPrice, String imageUrl) {
        this.petId = new SimpleIntegerProperty(petId);
        this.petName = new SimpleStringProperty(petName);
        this.petSpecies = new SimpleStringProperty(petSpecies);
        this.petBreed = new SimpleStringProperty(petBreed);
        this.petAge = new SimpleIntegerProperty(petAge);
        this.petStatus = new SimpleStringProperty(petStatus);
        this.petPrice = new SimpleDoubleProperty(petPrice);
        this.imageUrl = new SimpleStringProperty(imageUrl);
    }

    public int getPetId() {
        return petId.get();
    }

    public void setPetId(int petId) {
        this.petId.set(petId);
    }

    public SimpleIntegerProperty petIdProperty() {
        return petId;
    }

    public String getPetName() {
        return petName.get();
    }

    public void setPetName(String petName) {
        this.petName.set(petName);
    }

    public SimpleStringProperty petNameProperty() {
        return petName;
    }

    public String getPetSpecies() {
        return petSpecies.get();
    }

    public void setPetSpecies(String petSpecies) {
        this.petSpecies.set(petSpecies);
    }

    public SimpleStringProperty petSpeciesProperty() {
        return petSpecies;
    }

    public String getPetBreed() {
        return petBreed.get();
    }

    public void setPetBreed(String petBreed) {
        this.petBreed.set(petBreed);
    }

    public SimpleStringProperty petBreedProperty() {
        return petBreed;
    }

    public int getPetAge() {
        return petAge.get();
    }

    public void setPetAge(int petAge) {
        this.petAge.set(petAge);
    }

    public SimpleIntegerProperty petAgeProperty() {
        return petAge;
    }

    public String getPetStatus() {
        return petStatus.get();
    }

    public void setPetStatus(String petStatus) {
        this.petStatus.set(petStatus);
    }

    public SimpleStringProperty petStatusProperty() {
        return petStatus;
    }

    public double getPetPrice() {
        return petPrice.get();
    }

    public void setPetPrice(double petPrice) {
        this.petPrice.set(petPrice);
    }

    public SimpleDoubleProperty petPriceProperty() {
        return petPrice;
    }

    public String getImageUrl() {
        return imageUrl.get();
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl.set(imageUrl);
    }

    public SimpleStringProperty imageUrlProperty() {
        return imageUrl;
    }

    public String getCustomerName() {
        return customerName.get();
    }

    public void setCustomerName(String customerName) {
        this.customerName.set(customerName != null ? customerName : "");
    }

    public SimpleStringProperty customerNameProperty() {
        return customerName;
    }

    public String getStoreName() {
        return storeName.get();
    }

    public void setStoreName(String storeName) {
        this.storeName.set(storeName != null ? storeName : "");
    }

    public SimpleStringProperty storeNameProperty() {
        return storeName;
    }

    public long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(long customerId) {
        this.customerId = customerId;
    }

    public long getStoreId() {
        return storeId;
    }

    public void setStoreId(long storeId) {
        this.storeId = storeId;
    }
}
