Initial commit: Lagerbestand Blazor Projekt
This commit is contained in:
commit
cba9414e92
105 files changed
+36431
No files matched your search
@@ -0,0 +1,61 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Lagerbestand.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a label that can be attached to Kanban tasks
|
||||
/// </summary>
|
||||
public class KanbanLabel
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
[Required]
|
||||
[MaxLength(50)]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Hex color code for the label (e.g., "#FF5733")
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(7)]
|
||||
public string Color { get; set; } = "#6B7280";
|
||||
|
||||
/// <summary>
|
||||
/// Optional description for the label
|
||||
/// </summary>
|
||||
[MaxLength(200)]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Display order for labels
|
||||
/// </summary>
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
// Navigation properties
|
||||
public virtual ICollection<KanbanTaskLabel> TaskLabels { get; set; } = new List<KanbanTaskLabel>();
|
||||
public virtual ICollection<KanbanTaskTemplateLabel> TemplateLabels { get; set; } = new List<KanbanTaskTemplateLabel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Predefined label colors for easy selection
|
||||
/// </summary>
|
||||
public static class KanbanLabelColors
|
||||
{
|
||||
public static readonly Dictionary<string, string> Presets = new()
|
||||
{
|
||||
{ "Rot", "#EF4444" },
|
||||
{ "Orange", "#F97316" },
|
||||
{ "Gelb", "#EAB308" },
|
||||
{ "Grün", "#22C55E" },
|
||||
{ "Türkis", "#14B8A6" },
|
||||
{ "Blau", "#3B82F6" },
|
||||
{ "Indigo", "#6366F1" },
|
||||
{ "Violett", "#8B5CF6" },
|
||||
{ "Pink", "#EC4899" },
|
||||
{ "Grau", "#6B7280" }
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user