namespace Model
{
    public class Title
    {
        public string Name
        {
            get => name;

            set
            {
                if (value != null && value.Length < 75)
                {
                    name = value;
                }
            }
        }

        private string name;

        public string ImageURL
        {
            get => imageURL;

            set
            {
                if (value != null && value.Contains('.'))
                {
                    imageURL = value;
                }
            }
        }

        private string imageURL;

        public string Information
        {
            get => information;

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

        private string information;

        public Title(string nom, string file_Name, string informations)
        {
            Name = nom;
            ImageURL = file_Name;
            Information = informations;
        }

    }
}
