1 package fr.tiogars.inception.domains.domaintemplate.models;
2
3 import java.time.Instant;
4
5 import io.swagger.v3.oas.annotations.media.Schema;
6 import jakarta.validation.constraints.NotBlank;
7 import jakarta.validation.constraints.NotNull;
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 @Schema(description = "An business object persisted by the template API.")
23 public record DomainTemplate(
24 @Schema(description = "Generated persistent identifier.", example = "42", accessMode = Schema.AccessMode.READ_ONLY) @NotNull Long id,
25 @Schema(description = "Unique immutable business code.", example = "CUSTOMER", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank String code,
26 @Schema(description = "Display label.", example = "Customer", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank String label,
27 @Schema(description = "Optional business description.", example = "Customer DomainTemplate") String description,
28 @Schema(description = "UTC creation instant.", format = "date-time", accessMode = Schema.AccessMode.READ_ONLY) @NotNull Instant createdDate,
29 @Schema(description = "UTC instant of the last modification.", format = "date-time", accessMode = Schema.AccessMode.READ_ONLY) @NotNull Instant lastModifiedDate,
30 @Schema(description = "Username at creation.", accessMode = Schema.AccessMode.READ_ONLY) @NotNull String createdBy,
31 @Schema(description = "Username at the last modification.", accessMode = Schema.AccessMode.READ_ONLY) @NotNull String lastModifiedBy) {
32 }