40 lines
871 B
C#
Raw Normal View History

2024-01-27 20:05:24 +01:00
using Newtonsoft.Json;
2024-01-27 19:58:02 +01:00
using System;
2024-01-29 21:30:09 +01:00
using System.Collections.Generic;
2024-01-27 10:19:32 +01:00
2024-01-27 19:58:02 +01:00
[Serializable]
2024-01-27 20:05:24 +01:00
[JsonObject]
2024-01-27 10:19:32 +01:00
public class Proposition
{
public string photoUrl;
public Player owner;
2024-01-29 21:30:09 +01:00
public List<string> voters;
2024-01-27 23:05:27 +01:00
public double creationDate;
2024-01-29 21:30:09 +01:00
[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();
}
2024-01-27 10:19:32 +01:00
}