tweaks
This commit is contained in:
@@ -31,6 +31,7 @@ public sealed class GameDbContext : DbContext
|
||||
public DbSet<DungeonLootTable> DungeonLootTables => Set<DungeonLootTable>();
|
||||
public DbSet<DungeonLootTableEntry> DungeonLootTableEntries => Set<DungeonLootTableEntry>();
|
||||
public DbSet<DungeonMobLootTable> DungeonMobLootTables => Set<DungeonMobLootTable>();
|
||||
public DbSet<DungeonBeltItem> DungeonBeltItems => Set<DungeonBeltItem>();
|
||||
protected override void OnModelCreating(ModelBuilder b)
|
||||
{
|
||||
b.ApplyConfigurationsFromAssembly(typeof(GameDbContext).Assembly);
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Hotbar/belt item slot assignment for quick item access
|
||||
/// </summary>
|
||||
[Table("dungeon_belt_items")]
|
||||
public class DungeonBeltItem
|
||||
{
|
||||
[Key]
|
||||
public ulong Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public ulong CharacterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Hotbar slot (0-7)
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int SlotIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference to inventory slot index (not item ID, since items can stack/move)
|
||||
/// </summary>
|
||||
public int InventorySlotIndex { get; set; }
|
||||
|
||||
// Navigation
|
||||
[ForeignKey("CharacterId")]
|
||||
public virtual DungeonCharacter? Character { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user