diff --git a/MCTG/MCTGLib/Priority.cs b/MCTG/MCTGLib/Priority.cs new file mode 100644 index 0000000..9fe220a --- /dev/null +++ b/MCTG/MCTGLib/Priority.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MCTGLib +{ + /// + /// This is the list of priorities that user can define in his profil. Priorities + /// are also present in recipes to match the first user's priority with the recipe's priority. + /// + public class Priority + { + enum UserPriority { Economic, Fast, Easy, Light, Gourmet }; + } +} diff --git a/MCTG/MCTGLib/User.cs b/MCTG/MCTGLib/User.cs new file mode 100644 index 0000000..be9199d --- /dev/null +++ b/MCTG/MCTGLib/User.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Collections; +using System.Collections.ObjectModel; +using System.Threading.Tasks; + +namespace MCTGLib +{ + /// + /// A user is an entity with a name, a surname, mail, profilePict and a list of priority. + /// This user can login with a Id and password + /// + public class User + { + #region Private Attributes + + private string Name; + private string Surname; + private string Mail; + ///private ICollection _priorities = new List(); + + #endregion + + #region Public Properties + /// + /// User's Name + /// + + private string picture; + public string ProfilPict + { + get => picture; + set + { + picture = value; + if (picture == null) + { + picture = "PhotoParDefaut"; + } + } + + } + + #endregion + + + #region Constructors + + /// + /// Construtors of user. + /// + public User(string name, string surname, string mail, params Priority[] priorities ) + { + Name = name; + Surname = surname; + Mail = mail; + ///_priorities = new List(priorities); + } + + #endregion + + + } +}