beginning of model user and enum priority
continuous-integration/drone/push Build is passing Details

pull/35/head^2
Roxane ROSSETTO 2 years ago
parent d498829539
commit 40a09b09af

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MCTGLib
{
/// <summary>
/// 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.
/// </summary>
public class Priority
{
enum UserPriority { Economic, Fast, Easy, Light, Gourmet };
}
}

@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Collections;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
namespace MCTGLib
{
/// <summary>
/// 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
/// </summary>
public class User
{
#region Private Attributes
private string Name;
private string Surname;
private string Mail;
///private ICollection<Priority> _priorities = new List<Priority>();
#endregion
#region Public Properties
/// <summary>
/// User's Name
/// </summary>
private string picture;
public string ProfilPict
{
get => picture;
set
{
picture = value;
if (picture == null)
{
picture = "PhotoParDefaut";
}
}
}
#endregion
#region Constructors
/// <summary>
/// Construtors of user.
/// </summary>
public User(string name, string surname, string mail, params Priority[] priorities )
{
Name = name;
Surname = surname;
Mail = mail;
///_priorities = new List<Priority>(priorities);
}
#endregion
}
}
Loading…
Cancel
Save