af323da3d3
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
37 lines
992 B
Java
37 lines
992 B
Java
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;
|
|
}
|