1 package fr.tiogars.inception.settings.user.entities;
2
3 import java.time.Instant;
4
5 import io.swagger.v3.oas.annotations.media.Schema;
6 import jakarta.validation.constraints.NotNull;
7
8
9 public record UserSettings(
10 @Schema(description = "Owner user identifier. Null for role settings such as ANONYMOUS.", example = "2")
11 Long userId,
12 @Schema(description = "Owner role code. Null for user settings.", example = "ANONYMOUS")
13 String roleCode,
14 @Schema(
15 description = "Preferred view mode.",
16 example = "system",
17 allowableValues = {"light", "dark", "system"},
18 requiredMode = Schema.RequiredMode.REQUIRED)
19 @NotNull
20 String viewMode,
21 @Schema(description = "Creation timestamp. Null while default settings have never been saved.")
22 Instant createdDate,
23 @Schema(description = "Last modification timestamp. Null while default settings have never been saved.")
24 Instant lastModifiedDate) {
25 }