| | 1 | | using MUNity.Base; |
| | 2 | | using MUNity.Models.Simulation; |
| | 3 | | using System; |
| | 4 | | using System.Collections.Generic; |
| | 5 | | using System.ComponentModel.DataAnnotations; |
| | 6 | | using System.Text; |
| | 7 | |
|
| | 8 | | namespace MUNity.Schema.Simulation |
| | 9 | | { |
| | 10 | | /// <summary> |
| | 11 | | /// Users inside the Simulation can make Petition that can be accepted or denied by the Leader. |
| | 12 | | /// </summary> |
| | 13 | | public class PetitionDto : MUNity.Models.Simulation.IPetition |
| | 14 | | { |
| | 15 | |
|
| | 16 | | /// <summary> |
| | 17 | | /// The Id of the Petition generated by the GUID when creating a new isntance. |
| | 18 | | /// </summary> |
| 0 | 19 | | public string PetitionId { get; set; } |
| | 20 | |
|
| | 21 | | /// <summary> |
| | 22 | | /// References a Petition Type. |
| | 23 | | /// </summary> |
| 0 | 24 | | public int PetitionTypeId { get; set; } |
| | 25 | |
|
| | 26 | | /// <summary> |
| | 27 | | /// The current Status of the petition. |
| | 28 | | /// </summary> |
| 0 | 29 | | public EPetitionStates Status { get; set; } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// An optional Text for the Petition. |
| | 33 | | /// </summary> |
| 0 | 34 | | public string Text { get; set; } |
| | 35 | |
|
| | 36 | | /// <summary> |
| | 37 | | /// The DateTime when the Petition has been created. |
| | 38 | | /// </summary> |
| 0 | 39 | | public DateTime PetitionDate { get; set; } |
| | 40 | |
|
| | 41 | | /// <summary> |
| | 42 | | /// The UserId of the Petition. This is the Real user Id not the PublicUserId. |
| | 43 | | /// </summary> |
| 0 | 44 | | public int PetitionUserId { get; set; } |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// The AgendaItem that this petition is refering to. |
| | 48 | | /// </summary> |
| 0 | 49 | | public int TargetAgendaItemId { get; set; } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Creates a new Petition and generates a new Guid, Text will be string.Empty and the PetitionDate the current |
| | 53 | | /// </summary> |
| 0 | 54 | | public PetitionDto() |
| 0 | 55 | | { |
| 0 | 56 | | this.PetitionId = Guid.NewGuid().ToString(); |
| 0 | 57 | | this.Text = ""; |
| 0 | 58 | | this.PetitionDate = DateTime.Now; |
| 0 | 59 | | } |
| | 60 | | } |
| | 61 | | } |