| | 1 | | using MUNity.Base; |
| | 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.Runtime.Serialization; |
| | 8 | | using System.Text.Json.Serialization; |
| | 9 | | using System.Threading.Tasks; |
| | 10 | |
|
| | 11 | | namespace MUNity.Database.Models.Conference.Roles; |
| | 12 | |
|
| | 13 | | /// <summary> |
| | 14 | | /// The abstract role provides base functionality for the different types of roles |
| | 15 | | /// Every role as a name and a full name. Examples for role names could be. Head of organization. |
| | 16 | | /// project leader, team leader, participant support etc. |
| | 17 | | /// |
| | 18 | | /// Every role is part of one conference. You cannot use the exact same role inside another conference but you can |
| | 19 | | /// use templates to create a general structure of a conference. |
| | 20 | | /// <seealso cref="Roles.ConferenceDelegateRole"/> |
| | 21 | | /// <seealso cref="Roles.ConferenceNgoRole"/> |
| | 22 | | /// <seealso cref="Roles.ConferencePressRole"/> |
| | 23 | | /// <seealso cref="Roles.ConferenceSecretaryGeneralRole"/> |
| | 24 | | /// <seealso cref="Roles.ConferenceTeamRole"/> |
| | 25 | | /// <seealso cref="Roles.ConferenceVisitorRole"/> |
| | 26 | | /// </summary> |
| | 27 | | public abstract class AbstractConferenceRole |
| | 28 | | { |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// The Id of the Role. |
| | 32 | | /// </summary> |
| | 33 | | [Key] |
| 2 | 34 | | public int RoleId { get; set; } |
| | 35 | |
|
| | 36 | | /// <summary> |
| | 37 | | /// The short name of the role |
| | 38 | | /// </summary> |
| | 39 | | [MaxLength(150)] |
| 306 | 40 | | public string RoleName { get; set; } |
| | 41 | |
|
| | 42 | | /// <summary> |
| | 43 | | /// the long Name of the role |
| | 44 | | /// </summary> |
| | 45 | | [MaxLength(250)] |
| 306 | 46 | | public string RoleFullName { get; set; } |
| | 47 | |
|
| | 48 | | /// <summary> |
| | 49 | | /// A short for the role. for example PL for project leader. |
| | 50 | | /// </summary> |
| | 51 | | [MaxLength(10)] |
| 306 | 52 | | public string RoleShort { get; set; } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// The conference that this role is assigned to. |
| | 56 | | /// </summary> |
| 306 | 57 | | public Conference Conference { get; set; } |
| | 58 | |
|
| | 59 | | /// <summary> |
| | 60 | | /// the authorization of this role. |
| | 61 | | /// </summary> |
| 293 | 62 | | public ConferenceRoleAuth ConferenceRoleAuth { get; set; } |
| | 63 | |
|
| | 64 | | /// <summary> |
| | 65 | | /// an icon name for the role. the icon that will be displayed has to be chosen by |
| | 66 | | /// the frontend. |
| | 67 | | /// </summary> |
| | 68 | | [MaxLength(250)] |
| 9 | 69 | | public string IconName { get; set; } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// The application state. It gives information if a user can apply for this role or not. |
| | 73 | | /// It also provides information about the type of application progress, for example can |
| | 74 | | /// only someone that is part of the organization that holds this conference apply for this role |
| | 75 | | /// or anyone. Its also possible to only let users with an account on the platform apply for a role. |
| | 76 | | /// </summary> |
| 385 | 77 | | public EApplicationStates ApplicationState { get; set; } = EApplicationStates.Closed; |
| | 78 | |
|
| | 79 | | /// <summary> |
| | 80 | | /// an extended value for the application state. |
| | 81 | | /// </summary> |
| | 82 | | [MaxLength(250)] |
| 0 | 83 | | public string ApplicationValue { get; set; } |
| | 84 | |
|
| | 85 | | /// <summary> |
| | 86 | | /// Does this role allow more then one application and the project leader has to choose |
| | 87 | | /// which application and user he picks for this role. If this is turned to false it is |
| | 88 | | /// first come - first served principal and the application mode will close when someone has applied. |
| | 89 | | /// </summary> |
| 323 | 90 | | public bool AllowMultipleParticipations { get; set; } = false; |
| | 91 | |
|
| | 92 | | /// <summary> |
| | 93 | | /// The type of the role. This will most likely return "DelegateRole", "NgoRole", "PressRole", |
| | 94 | | /// "SecreataryGeneralRole", "TeamRole" or "VisitorRole". |
| | 95 | | /// This field is used for the concurrencyToken |
| | 96 | | /// </summary> |
| | 97 | | [MaxLength(150)] |
| | 98 | |
|
| 1 | 99 | | public string RoleType { get; [Obsolete("This is the concurrencyToken please only read")]set; } |
| | 100 | |
|
| | 101 | |
|
| 0 | 102 | | public ICollection<Participation> Participations { get; set; } |
| | 103 | | } |