|
|
|
@ -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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|