using Microsoft.EntityFrameworkCore; using OnlyPrompt.Backend.Database.Core; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace OnlyPrompt.Backend.Database.Models { [Index(nameof(Slug), IsUnique = true)] public class CategoryModel : EntityBase, IHasSlug { [MaxLength(ModelConstants.MaxSlugLength)] [Column(TypeName = "citext")] public required string Slug { get; set; } public required string Name { get; set; } public string? Description { get; set; } public virtual IList Prompts { get; set; } = new List(); } }