littleshop/Models/Category.cs
2025-08-20 13:20:19 +01:00

23 lines
555 B
C#

using System.ComponentModel.DataAnnotations;
namespace LittleShop.Models;
public class Category
{
[Key]
public Guid Id { get; set; }
[Required]
[StringLength(100)]
public string Name { get; set; } = string.Empty;
[StringLength(500)]
public string? Description { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public bool IsActive { get; set; } = true;
// Navigation properties
public virtual ICollection<Product> Products { get; set; } = new List<Product>();
}