package de.htwsaar.webshop.model;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Null;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

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

@Getter
@Setter
@ToString
@AllArgsConstructor
public class ReviewModel {
    @Min(VALID_MIN_MILLIS_TIMESTAMP)
    long timestamp;

    @Min(0)
    @Max(10)
    int rating;

    @Null
    String content;
}
