using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using DataServer.Data.Entities; namespace DataServer.Data.Entities { /// /// A single entry in a loot table - one possible drop /// [Table("dungeon_loot_table_entries")] public class DungeonLootTableEntry { [Key] public int Id { get; set; } /// /// The loot table this entry belongs to /// public int LootTableId { get; set; } [ForeignKey(nameof(LootTableId))] public DungeonLootTable? LootTable { get; set; } /// /// The item that can drop /// public int ItemDefinitionId { get; set; } [ForeignKey(nameof(ItemDefinitionId))] public DungeonItemDefinition? ItemDefinition { get; set; } /// /// Base drop chance (0.0 - 1.0) /// 1.0 = 100%, 0.1 = 10%, 0.01 = 1% /// public float DropChance { get; set; } = 0.1f; /// /// Minimum quantity to drop /// public int MinQuantity { get; set; } = 1; /// /// Maximum quantity to drop /// public int MaxQuantity { get; set; } = 1; /// /// Weight for weighted random selection (higher = more likely) /// Used when selecting which items drop /// public int Weight { get; set; } = 100; /// /// If true, this is a guaranteed drop (ignores DropChance) /// public bool Guaranteed { get; set; } = false; /// /// Additional drop chance per dungeon tier /// Example: 0.02 means +2% chance per tier /// public float DropChancePerTier { get; set; } = 0.0f; /// /// Maximum drop chance after tier scaling /// public float MaxDropChance { get; set; } = 1.0f; } }