using System.ComponentModel.DataAnnotations;
namespace Lagerbestand.Models;
///
/// Represents a label that can be attached to Kanban tasks
///
public class KanbanLabel
{
public Guid Id { get; set; } = Guid.NewGuid();
[Required]
[MaxLength(50)]
public string Name { get; set; } = string.Empty;
///
/// Hex color code for the label (e.g., "#FF5733")
///
[Required]
[MaxLength(7)]
public string Color { get; set; } = "#6B7280";
///
/// Optional description for the label
///
[MaxLength(200)]
public string? Description { get; set; }
///
/// Display order for labels
///
public int SortOrder { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
// Navigation properties
public virtual ICollection TaskLabels { get; set; } = new List();
public virtual ICollection TemplateLabels { get; set; } = new List();
}
///
/// Predefined label colors for easy selection
///
public static class KanbanLabelColors
{
public static readonly Dictionary Presets = new()
{
{ "Rot", "#EF4444" },
{ "Orange", "#F97316" },
{ "Gelb", "#EAB308" },
{ "Grün", "#22C55E" },
{ "Türkis", "#14B8A6" },
{ "Blau", "#3B82F6" },
{ "Indigo", "#6366F1" },
{ "Violett", "#8B5CF6" },
{ "Pink", "#EC4899" },
{ "Grau", "#6B7280" }
};
}