feat(documents): add DocumentDensityResult and MonthBucket records (#385)
Response shape for the upcoming GET /api/documents/density endpoint. minDate and maxDate are nullable (null on empty archive); buckets is always present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
package org.raddatz.familienarchiv.document;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public record DocumentDensityResult(
|
||||||
|
@Schema(requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
List<MonthBucket> buckets,
|
||||||
|
LocalDate minDate,
|
||||||
|
LocalDate maxDate
|
||||||
|
) {}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package org.raddatz.familienarchiv.document;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
public record MonthBucket(
|
||||||
|
@Schema(requiredMode = Schema.RequiredMode.REQUIRED, example = "1915-08")
|
||||||
|
String month,
|
||||||
|
@Schema(requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
int count
|
||||||
|
) {}
|
||||||
Reference in New Issue
Block a user