< Summary

Class:MUNity.Database.Models.Conference.Roles.AbstractConferenceRole
Assembly:MUNity.Database
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityDatabase\Models\Conference\Roles\AbstractConferenceRole.cs
Covered lines:10
Uncovered lines:2
Coverable lines:12
Total lines:103
Line coverage:83.3% (10 of 12)
Covered branches:0
Total branches:0
Covered methods:10
Total methods:12
Method coverage:83.3% (10 of 12)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_RoleId()100%1100%
get_RoleName()100%1100%
get_RoleFullName()100%1100%
get_RoleShort()100%1100%
get_Conference()100%1100%
get_ConferenceRoleAuth()100%1100%
get_IconName()100%1100%
get_ApplicationState()100%1100%
get_ApplicationValue()100%10%
get_AllowMultipleParticipations()100%1100%
get_RoleType()100%1100%
get_Participations()100%10%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityDatabase\Models\Conference\Roles\AbstractConferenceRole.cs

#LineLine coverage
 1using MUNity.Base;
 2using System;
 3using System.Collections.Generic;
 4using System.ComponentModel.DataAnnotations;
 5using System.ComponentModel.DataAnnotations.Schema;
 6using System.Linq;
 7using System.Runtime.Serialization;
 8using System.Text.Json.Serialization;
 9using System.Threading.Tasks;
 10
 11namespace 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>
 27public abstract class AbstractConferenceRole
 28{
 29
 30    /// <summary>
 31    /// The Id of the Role.
 32    /// </summary>
 33    [Key]
 234    public int RoleId { get; set; }
 35
 36    /// <summary>
 37    /// The short name of the role
 38    /// </summary>
 39    [MaxLength(150)]
 30640    public string RoleName { get; set; }
 41
 42    /// <summary>
 43    /// the long Name of the role
 44    /// </summary>
 45    [MaxLength(250)]
 30646    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)]
 30652    public string RoleShort { get; set; }
 53
 54    /// <summary>
 55    /// The conference that this role is assigned to.
 56    /// </summary>
 30657    public Conference Conference { get; set; }
 58
 59    /// <summary>
 60    /// the authorization of this role.
 61    /// </summary>
 29362    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)]
 969    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>
 38577    public EApplicationStates ApplicationState { get; set; } = EApplicationStates.Closed;
 78
 79    /// <summary>
 80    /// an extended value for the application state.
 81    /// </summary>
 82    [MaxLength(250)]
 083    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>
 32390    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
 199    public string RoleType { get; [Obsolete("This is the concurrencyToken please only read")]set; }
 100
 101
 0102    public ICollection<Participation> Participations { get; set; }
 103}