| | 1 | | using MUNity.Database.Models.User; |
| | 2 | | using System; |
| | 3 | | using System.Collections.Generic; |
| | 4 | | using System.ComponentModel.DataAnnotations; |
| | 5 | | using System.ComponentModel.DataAnnotations.Schema; |
| | 6 | | using System.Linq; |
| | 7 | | using System.Threading.Tasks; |
| | 8 | |
|
| | 9 | | namespace MUNity.Database.Models.Resolution; |
| | 10 | |
|
| | 11 | | /// <summary> |
| | 12 | | /// A ResolutionAuth saves a resolution inside the Database and manages |
| | 13 | | /// the access to this element. Note that this Logic is seperated from the |
| | 14 | | /// MUN-Core this is due to a discussion that resulted in a clear split |
| | 15 | | /// between basic MUN functions and advanced editors. |
| | 16 | | /// </summary> |
| | 17 | | public class ResolutionAuth |
| | 18 | | { |
| | 19 | | [Key] |
| | 20 | | [ForeignKey(nameof(Resolution))] |
| 1 | 21 | | public string ResolutionId { get; set; } |
| | 22 | |
|
| 0 | 23 | | public MunityUser CreationUser { get; set; } |
| | 24 | |
|
| 0 | 25 | | public DateTime CreationDate { get; set; } |
| | 26 | |
|
| 0 | 27 | | public DateTime LastChangeTime { get; set; } |
| | 28 | |
|
| 0 | 29 | | public ICollection<ResolutionUser> Users { get; set; } |
| | 30 | |
|
| 0 | 31 | | public bool AllowPublicRead { get; set; } |
| | 32 | |
|
| 0 | 33 | | public bool AllowPublicEdit { get; set; } |
| | 34 | |
|
| 0 | 35 | | public bool AllowConferenceRead { get; set; } |
| | 36 | |
|
| 0 | 37 | | public bool AllowCommitteeRead { get; set; } |
| | 38 | |
|
| 0 | 39 | | public bool AllowOnlineAmendments { get; set; } |
| | 40 | |
|
| 0 | 41 | | public string PublicShortKey { get; set; } |
| | 42 | |
|
| 0 | 43 | | public string EditPassword { get; set; } |
| | 44 | |
|
| 0 | 45 | | public string ReadPassword { get; set; } |
| | 46 | |
|
| | 47 | | /// <summary> |
| | 48 | | /// Links to a MUN Core Committee |
| | 49 | | /// </summary> |
| 0 | 50 | | public Conference.Committee Committee { get; set; } |
| | 51 | |
|
| 0 | 52 | | public Simulation.Simulation Simulation { get; set; } |
| | 53 | |
|
| 0 | 54 | | public ResaElement Resolution { get; set; } |
| | 55 | |
|
| 11 | 56 | | public ResolutionAuth() |
| 11 | 57 | | { |
| | 58 | |
|
| 11 | 59 | | } |
| | 60 | | } |