| | 1 | | using System; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using System.ComponentModel.DataAnnotations; |
| | 4 | | using System.Diagnostics.CodeAnalysis; |
| | 5 | | using System.Linq; |
| | 6 | | using System.Text.Json.Serialization; |
| | 7 | | using System.Threading.Tasks; |
| | 8 | |
|
| | 9 | | namespace MUNity.Database.Models.Simulation; |
| | 10 | |
|
| | 11 | | public class SimulationUser |
| | 12 | | { |
| 0 | 13 | | public int SimulationUserId { get; set; } |
| | 14 | |
|
| 0 | 15 | | public string Token { get; set; } |
| | 16 | |
|
| 0 | 17 | | public string DisplayName { get; set; } |
| | 18 | |
|
| 0 | 19 | | public string PublicUserId { get; set; } |
| | 20 | |
|
| 0 | 21 | | public string Password { get; set; } |
| | 22 | |
|
| 0 | 23 | | public int PinRetries { get; set; } |
| | 24 | |
|
| 0 | 25 | | public SimulationRole Role { get; set; } |
| | 26 | |
|
| 0 | 27 | | public bool CanCreateRole { get; set; } |
| | 28 | |
|
| 0 | 29 | | public bool CanSelectRole { get; set; } |
| | 30 | |
|
| 0 | 31 | | public bool CanEditResolution { get; set; } = false; |
| | 32 | |
|
| 0 | 33 | | public bool CanEditListOfSpeakers { get; set; } = false; |
| | 34 | |
|
| 0 | 35 | | public string LastKnownConnectionId { get; set; } |
| | 36 | |
|
| 0 | 37 | | public Simulation Simulation { get; set; } |
| | 38 | |
|
| 0 | 39 | | public ICollection<Petition> Petitions { get; set; } |
| | 40 | |
|
| 0 | 41 | | public SimulationUser() |
| 0 | 42 | | { |
| 0 | 43 | | this.Token = Util.IdGenerator.RandomString(20); |
| 0 | 44 | | this.Password = Util.IdGenerator.RandomString(8); |
| 0 | 45 | | this.PublicUserId = new Random().Next(100000000, 999999999).ToString(); |
| 0 | 46 | | PinRetries = 0; |
| 0 | 47 | | } |
| | 48 | | } |