| | 1 | | using MUNity.Base; |
| | 2 | | using System; |
| | 3 | | using System.Collections.Generic; |
| | 4 | | using System.Linq; |
| | 5 | | using System.Threading.Tasks; |
| | 6 | |
|
| | 7 | | namespace MUNity.Database.Models.Simulation; |
| | 8 | |
|
| | 9 | | /// <summary> |
| | 10 | | /// A Petition is a request inside a simulation made by any instance of a simulation user. |
| | 11 | | /// The Petition has a specific type <see cref="Petition.PetitionType"/>. |
| | 12 | | /// </summary> |
| | 13 | | public class Petition |
| | 14 | | { |
| | 15 | | /// <summary> |
| | 16 | | /// The Id of the Petition generated as a new Guid when the Petition object is created. |
| | 17 | | /// </summary> |
| 0 | 18 | | public string PetitionId { get; set; } |
| | 19 | |
|
| | 20 | | /// <summary> |
| | 21 | | /// The state of this petition. For example is it active (the committee is currently working on this petition). |
| | 22 | | /// </summary> |
| 0 | 23 | | public EPetitionStates Status { get; set; } |
| | 24 | |
|
| | 25 | | /// <summary> |
| | 26 | | /// An optional extra text for the petition. This differs from the type of petition display name. |
| | 27 | | /// </summary> |
| 0 | 28 | | public string Text { get; set; } |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// The timestamp when this petition was created. Is set to the current DateTime when the object is created. |
| | 32 | | /// </summary> |
| 0 | 33 | | public DateTime PetitionDate { get; set; } |
| | 34 | |
|
| | 35 | | /// <summary> |
| | 36 | | /// The Type of petition. This link makes it possible to link the PetitionType that is not Inside a simulaiton. |
| | 37 | | /// This is a possible weakness. The PetitionType will maybe switched to PetitionTypeSimulation. |
| | 38 | | /// </summary> |
| 0 | 39 | | public PetitionType PetitionType { get; set; } |
| | 40 | |
|
| | 41 | | /// <summary> |
| | 42 | | /// The Slot of the simulation (Simulation User) that made this petition. |
| | 43 | | /// </summary> |
| 0 | 44 | | public SimulationUser SimulationUser { get; set; } |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// The parent agendaitem that this petition refers to. |
| | 48 | | /// </summary> |
| 0 | 49 | | public AgendaItem AgendaItem { get; set; } |
| | 50 | |
|
| 0 | 51 | | public Petition() |
| 0 | 52 | | { |
| 0 | 53 | | PetitionId = Guid.NewGuid().ToString(); |
| 0 | 54 | | PetitionDate = DateTime.Now; |
| 0 | 55 | | } |
| | 56 | | } |