feat: add character sales tracking with 12h countdown timer
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:
2026-08-18 09:22:41 -04:00
parent 8ca11252d7
commit af323da3d3
11 changed files with 848 additions and 0 deletions
@@ -0,0 +1,36 @@
package com.l2.shots.sales;
import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Index;
import jakarta.persistence.Table;
import java.time.Instant;
import java.util.UUID;
@Entity
@Table(name = "character_sales", indexes = {
@Index(name = "idx_char_sales_user", columnList = "user_id, started_at")
})
public class CharacterSale extends PanacheEntityBase {
@Id
public UUID id;
@Column(name = "user_id", nullable = false)
public UUID userId;
@Column(name = "character_name", nullable = false, length = 50)
public String characterName;
@Column(name = "items_description", nullable = false, columnDefinition = "TEXT")
public String itemsDescription;
@Column(name = "started_at", nullable = false)
public Instant startedAt;
@Column(name = "created_at", nullable = false)
public Instant createdAt;
}