package ru.vyatsu.qr_access_admin.unit.model;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import ru.vyatsu.qr_access_admin.common.validation.IsAfter;

import java.time.LocalDateTime;

@NoArgsConstructor
@Getter
@Setter
public class UnitModel {

    private String id;
    @NotBlank
    @Size(max = 100)
    private String clientId;
    @Size(max = 255)
    @NotBlank
    private String clientSecret;
    @IsAfter
    private LocalDateTime clientSecretExpiresAt;
    @NotBlank
    @Size(max = 255)
    private String clientName;

    private boolean adminEditable;

    private String partnerId;
}
