using System.ComponentModel.DataAnnotations;
namespace Intentor.Models;

public class Intent
{
    [Key]
    public int Id { get; set; }

    [Required]
    public int SpaceId { get; set; }

    [Required]
    public Space Space { get; set; } = null!;

    [Required]
    [MaxLength(200)]
    public string Name { get; set; } = string.Empty;

    [Required]
    public HomeAssistantAction Action { get; set; } = new();

    public int Priority { get; set; }

    // Activations that currently (or historically) put this intent on the stack
    public ICollection<IntentActivation> Activations { get; set; } = new List<IntentActivation>();

    public ICollection<IntentRequirement> Requirements { get; set; } = new List<IntentRequirement>();
    public ICollection<IntentRequirement> RequiredBy { get; set; } = new List<IntentRequirement>();
}