package dev.model;

import java.math.BigDecimal;
import java.time.LocalDateTime;

public class Order {

    private int id;
    private int userId;
    private LocalDateTime createdAt;
    private BigDecimal totalPrice;

    public Order() {}

    public Order(int id, int userId, LocalDateTime createdAt, BigDecimal totalPrice) {
        this.id = id;
        this.userId = userId;
        this.createdAt = createdAt;
        this.totalPrice = totalPrice;
    }

    public Order(int userId, BigDecimal totalPrice) {
        this.userId = userId;
        this.totalPrice = totalPrice;
    }

    public int getId() { return id; }
    public void setId(int id) { this.id = id; }
    public int getUserId() { return userId; }
    public void setUserId(int userId) { this.userId = userId; }
    public LocalDateTime getCreatedAt() { return createdAt; }
    public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
    public BigDecimal getTotalPrice() { return totalPrice; }
    public void setTotalPrice(BigDecimal totalPrice) { this.totalPrice = totalPrice; }

    @Override
    public String toString() {
        return "Order #" + id + " - " + createdAt + " - Total: $" + totalPrice;
    }
}