package com.devsoap.tincheck.routes.requests;

import com.devsoap.tincheck.tin.TinGenerator;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.micronaut.core.annotation.Introspected;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

@Introspected
public record TinGenerateRequest(
    @JsonProperty(value = "country", required = true) @NotBlank String country,
    @JsonProperty(value = "dateOfBirth", required = true) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") @NotNull LocalDate dateOfBirth,
    @JsonProperty(value = "gender", required = true) @NotNull TinGenerator.Gender gender
){}