using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace DataServer.Data.Entities; /// /// Defines a damage resistance type that can be applied to mobs, players, and items. /// This allows for dynamic resistance types beyond the base DamageType enum. /// [Table("damage_resistance_types")] public class DamageResistanceType { [Key] public int Id { get; set; } /// /// Internal key name (lowercase, no spaces) - e.g., "fire", "ice", "bleed" /// Used in JSON resistance blocks /// [Required] [MaxLength(32)] public string Key { get; set; } = ""; /// /// Display name for UI - e.g., "Fire", "Ice", "Bleeding" /// [Required] [MaxLength(64)] public string DisplayName { get; set; } = ""; /// /// Description of what this resistance does /// [MaxLength(256)] public string Description { get; set; } = ""; /// /// Hex color for UI display (e.g., "#ff4400" for fire) /// [MaxLength(16)] public string Color { get; set; } = "#888888"; /// /// Icon path on CDN (optional) /// [MaxLength(256)] public string? IconPath { get; set; } /// /// Sort order for display in dropdowns /// public int SortOrder { get; set; } = 0; /// /// Whether this resistance type is available for use /// public bool IsEnabled { get; set; } = true; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; }