namespace Model;

public class InfoTitle : Title
{
    public Artiste Artiste { get; set; }

    public string Description
    {
        get => description;

        set
        {
            if (value != null && value.Length < 500)
            {
                description = value;
            }
        }
    }

    private string description;

    public IEnumerable<Artiste> Feat { get; set; }

    public Genre Genre { get; set; }

    public InfoTitle(string name, string imageURL, string information, Artiste artist, string description, Genre genre) : base(name,imageURL,information)
    {
        Artiste = artist;
        Description = description;
        Genre = genre;
        Feat = new List<Artiste>();
    }

    public void AddFeat(Artiste artist)
    {
        Feat.Prepend(artist);
    }
    public void RemoveFeat(Artiste artiste)
    {
        foreach (var item in Feat)
        {
            Feat = Feat.Where(item => item != artiste).ToList();
        }
    }

}
