package org.example.petshopdesktop.DTOs;

import javafx.beans.property.*;

public class SaleDTO {

    private IntegerProperty saleId;
    private StringProperty saleDate;
    private StringProperty employeeName;
    private StringProperty productName;
    private IntegerProperty quantity;
    private DoubleProperty unitPrice;
    private DoubleProperty total;
    private StringProperty paymentMethod;

    public SaleDTO(int saleId, String saleDate, String employeeName, String productName,
                   int quantity, double unitPrice, double total, String paymentMethod) {
        this.saleId = new SimpleIntegerProperty(saleId);
        this.saleDate = new SimpleStringProperty(saleDate);
        this.employeeName = new SimpleStringProperty(employeeName);
        this.productName = new SimpleStringProperty(productName);
        this.quantity = new SimpleIntegerProperty(quantity);
        this.unitPrice = new SimpleDoubleProperty(unitPrice);
        this.total = new SimpleDoubleProperty(total);
        this.paymentMethod = new SimpleStringProperty(paymentMethod);
    }

    // Getters
    public int getSaleId() {
        return saleId.get();
    }

    public String getSaleDate() {
        return saleDate.get();
    }

    public String getEmployeeName() {
        return employeeName.get();
    }

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

    public int getQuantity() {
        return quantity.get();
    }

    public double getUnitPrice() {
        return unitPrice.get();
    }

    public double getTotal() {
        return total.get();
    }

    public String getPaymentMethod() {
        return paymentMethod.get();
    }

    // Properties
    public IntegerProperty saleIdProperty() {
        return saleId;
    }

    public StringProperty saleDateProperty() {
        return saleDate;
    }

    public StringProperty employeeNameProperty() {
        return employeeName;
    }

    public StringProperty productNameProperty() {
        return productName;
    }

    public IntegerProperty quantityProperty() {
        return quantity;
    }

    public DoubleProperty unitPriceProperty() {
        return unitPrice;
    }

    public DoubleProperty totalProperty() {
        return total;
    }

    public StringProperty paymentMethodProperty() {
        return paymentMethod;
    }
}
