package com.devsoap.tincheck.routes.responses;

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 jdk.jfr.Timestamp;

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

@Introspected
public record GenerationResult(
        @JsonProperty("value") String value,
        @JsonProperty("dateOfBirth") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") @Timestamp LocalDate dateOfBirth,
        @JsonProperty("gender")  @NotNull TinGenerator.Gender gender,
        @JsonProperty("availableTokens") Long tokens
){ }