package de.htwsaar.webshop.model;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

import static de.htwsaar.webshop.util.TimeUtil.VALID_MIN_MILLIS_TIMESTAMP;


@Getter
@Setter
@AllArgsConstructor
public class OrderModel {
    @NotNull
    private Long id;

    @NotNull
    private Long customerId;

    @Min(VALID_MIN_MILLIS_TIMESTAMP)
    private Long time;

    @NotNull
    private OrderStatus status;

    @NotNull
    private List<OrderItemModel> orderItems;
}
