package dev.model;

import java.time.LocalDateTime;

public class Order {

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

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

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

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(int totalPrice) {
        this.totalPrice = totalPrice;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", userId=" + userId +
                ", createdAt=" + createdAt +
                ", totalPrice=" + totalPrice +
                '}';
    }
}