using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using DataServer.Data.Entities; namespace DataServer.Data.Entities { /// /// Maps mobs to their loot tables (many-to-many) /// A mob can have multiple loot tables, and a loot table can be used by multiple mobs /// [Table("dungeon_mob_loot_tables")] public class DungeonMobLootTable { [Key] public int Id { get; set; } public int MobDefinitionId { get; set; } [ForeignKey(nameof(MobDefinitionId))] public DungeonMobDefinition? MobDefinition { get; set; } public int LootTableId { get; set; } [ForeignKey(nameof(LootTableId))] public DungeonLootTable? LootTable { get; set; } /// /// Priority/order for rolling this table (lower = first) /// public int Priority { get; set; } = 0; /// /// Chance this loot table is rolled at all (0.0 - 1.0) /// public float RollChance { get; set; } = 1.0f; } }