using Newtonsoft.Json;
using System;
using System.Collections.Generic;

[Serializable]
[JsonObject]
public class Proposition
{
    public string photoUrl;
    public Player owner;
    public List<string> voters;
    public double creationDate;

    [JsonConstructor]
    public Proposition(string _photoUrl, Player _owner, List<string> _voters, double _creationDate)
    {
        photoUrl = _photoUrl;
        owner = null;
        voters = _voters;
        creationDate = _creationDate;
    }

    public Proposition()
    {
        photoUrl = string.Empty;
        owner = null;
        voters = new List<string>();
        creationDate = DateTime.Now.ToOADate();
    }

    public Proposition(Player _player)
    {
        photoUrl = string.Empty;
        owner = _player;
        voters = new List<string>();
        creationDate = DateTime.Now.ToOADate();
    }

}
