DomainTemplate.java
package fr.tiogars.inception.client;
import java.time.Instant;
/**
* Represents a DomainTemplate returned by the DomainTemplate API.
*
* @param id persistent identifier
* @param code unique template code
* @param label display label
* @param description optional description
* @param createdDate creation timestamp
* @param lastModifiedDate last modification timestamp
* @param createdBy username at creation
* @param lastModifiedBy username at the last modification
* @since 0.1.0
*/
public record DomainTemplate(
Long id,
String code,
String label,
String description,
Instant createdDate,
Instant lastModifiedDate,
String createdBy,
String lastModifiedBy
) {
/**
* Creates a template without audit actors for compatibility with older API responses.
*
* @param id persistent identifier
* @param code unique template code
* @param label display label
* @param description optional description
* @param createdDate creation timestamp
* @param lastModifiedDate last modification timestamp
*/
public DomainTemplate(Long id, String code, String label, String description,
Instant createdDate, Instant lastModifiedDate) {
this(id, code, label, description, createdDate, lastModifiedDate, null, null);
}
}