package com.l2.shots.sales; import io.quarkus.runtime.annotations.RegisterForReflection; import java.time.Instant; @RegisterForReflection public record CharacterSaleIn( String characterName, String itemsDescription, Instant startedAt) { public CharacterSaleIn { if (characterName == null || characterName.isBlank()) { throw new IllegalArgumentException("characterName is required"); } if (characterName.length() > 50) { throw new IllegalArgumentException("characterName must be 50 chars or less"); } if (itemsDescription == null || itemsDescription.isBlank()) { throw new IllegalArgumentException("itemsDescription is required"); } if (itemsDescription.length() > 2000) { throw new IllegalArgumentException("itemsDescription must be 2000 chars or less"); } } }