feat: add character sales tracking with 12h countdown timer
CI / Build Native (push) Failing after 1m11s
CI / Build Native (push) Failing after 1m11s
- 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
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user