27 lines
789 B
C#
27 lines
789 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Server.Data.Entities;
|
|
|
|
/// <summary>
|
|
/// Actual item instance owned by a character (inventory or equipped)
|
|
/// </summary>
|
|
[Table("dungeon_character_items")]
|
|
public class DungeonCharacterItem
|
|
{
|
|
[Key]
|
|
public ulong Id { get; set; }
|
|
|
|
public ulong CharacterId { get; set; }
|
|
public int ItemDefinitionId { get; set; }
|
|
|
|
public int Quantity { get; set; } = 1;
|
|
public int SlotIndex { get; set; } // Inventory position (0-29 for example)
|
|
|
|
public DateTime AcquiredAt { get; set; } = DateTime.UtcNow;
|
|
|
|
// Navigation
|
|
public virtual DungeonCharacter? Character { get; set; }
|
|
public virtual DungeonItemDefinition? Definition { get; set; }
|
|
}
|