| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace GreenTree.Nachtragsmanagement.Core.Domain.User
- {
- public class Role : BaseEntity
- {
- #region Fields
- /// <summary>
- /// Functionlist
- /// </summary>
- private ICollection<Function> _functions;
- #endregion
- /// <summary>
- /// Description
- /// </summary>
- public string Description { get; set; }
- /// <summary>
- /// Level of right (higher value means higher right)
- /// </summary>
- public int Level { get; set; }
- /// <summary>
- /// Determines if the role can only see sites which it is assigned to
- /// </summary>
- public bool SeeOnlyAssigned { get; set; }
- /// <summary>
- /// Functions the role have
- /// </summary>
- public virtual ICollection<Function> Functions
- {
- get { return _functions ?? (_functions = new List<Function>()); }
- protected set { _functions = value; }
- }
- #region Helper
- /// <summary>
- /// Adds missing functions and removes not selected functions
- /// </summary>
- /// <param name="functions">Functions.</param>
- public void SetFunctions(ICollection<Function> functions)
- {
- Functions = functions;
- }
- #endregion
- }
- }
|