using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAL {
	[MetadataType(typeof(PersonneMetadata))]
	partial class AjouxAuxEntites {
		private class PersonneMetadata {
			[Display(Name = "Identifiant")]
			public System.Guid Id { get; set; }
			[Display(Name = "Civilite")]
			public short TitreId { get; set; }
			[Display(Name = "Nom")]
			[Required(ErrorMessage = "{0} est obligatoire !")]
			[MaxLength(50, ErrorMessage = "50 caractere maxi pour {0}")]
			public string Nom { get; set; }
			[Display(Name = "Prenom")]
			[Required(ErrorMessage ="{0} est obligatoire !")]
			[MaxLength(50, ErrorMessage ="50 caractere maxi pour {0}")]
			public string Prenom { get; set; }
			[Display(Name = "Telephone")]
			[Required(ErrorMessage = "{0} est obligatoire !")]
			[RegularExpression("^0[1-9][0-9]{8}$", ErrorMessage = "C'est pas un telephone, ça!")]
			public string Telephone { get; set; }
		}
	}
}
