Files
shot-crafter-calculator/src/main/java/com/l2/shots/sales/CharacterSaleIn.java
T
darroyo af323da3d3
CI / Build Native (push) Failing after 1m11s
feat: add character sales tracking with 12h countdown timer
- New page /ventas to track characters selling items
- Default 12h duration per character sale
- Real-time countdown with color-coded badges (green/yellow/red/gray)
- Sound alert toggle when sales expire
- CRUD API: GET/POST/DELETE /api/sales
- Flyway migration V2 for character_sales table
- Private per-user (same user sees only their own characters)
- Expired sales remain visible with 'Expirado' badge until manually deleted
2026-08-18 09:22:41 -04:00

28 lines
909 B
Java

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");
}
}
}