using GameAtlas.Views;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace GameAtlas.Models
{
    [DataContract]
    [KnownType(typeof(Admin))]
    public class Utilisateur
    {
        [DataMember]
        public string Mail { get; private set; }
        [DataMember]
        public string Pseudo { get; private set; }
        [DataMember]
        public string Mdp { get; private set; }
        [DataMember]
        public string DateCreation { get; private set; }
        [DataMember]
        public bool EstAdmin { get; set; }
        [DataMember]
        public ObservableCollection<Jeu> ListePossedes { get; private set; }
        [DataMember]
        public ObservableCollection<Jeu> ListeFavoris { get; private set; }

        public Utilisateur(string mail, string pseudo, string mdp)
        {
            Mail = mail;
            Pseudo = pseudo;
            Mdp = mdp;
            DateCreation = DateTime.Today.ToString("d");
            ListePossedes = new ObservableCollection<Jeu>();
            ListeFavoris = new ObservableCollection<Jeu>();
            EstAdmin = false;
        }



        public int Connexion(string pseudo, string mdp) { return 0; }
        public int Inscription(string mail, string pseudo, string mdp) { return 0; }
        public void AjouterCom(Jeu jeu, string com) { }
        public void SupprimerCom(Jeu jeu, string com) { }
        public void AjouterEvaluation(Jeu jeu, int nbEtoiles) { }
    }
}
