Snaparazzi/Assets/Scripts/DatabaseClasses/Proposition.cs
2024-01-29 21:30:09 +01:00

40 lines
871 B
C#

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();
}
}