mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
feat: enhance inventory schema to support longer ItemSlug and add GiftBox equipment payload handling
This commit is contained in:
@@ -338,6 +338,7 @@ public class DorkNetDbContext(DbContextOptions<DorkNetDbContext> options) : DbCo
|
||||
modelBuilder.Entity<PlayerInventoryEntity>(e =>
|
||||
{
|
||||
e.HasKey(p => p.Id);
|
||||
e.Property(p => p.ItemSlug).HasMaxLength(128);
|
||||
// One row per (player, item) pair.
|
||||
e.HasIndex(p => new { p.PlayerId, p.ItemSlug }).IsUnique();
|
||||
e.HasIndex(p => p.PlayerId);
|
||||
|
||||
@@ -23,7 +23,7 @@ public class PlayerInventoryEntity
|
||||
/// Stored as a string rather than an int FK because a player can
|
||||
/// be granted items that aren't in the live store (admin-gifted,
|
||||
/// legacy retired items, etc.).</summary>
|
||||
[MaxLength(64)]
|
||||
[MaxLength(128)]
|
||||
public string ItemSlug { get; set; } = string.Empty;
|
||||
|
||||
public int Quantity { get; set; } = 1;
|
||||
|
||||
Reference in New Issue
Block a user