| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Security.Claims;
- using Abp.Domain.Entities;
- using Abp.Domain.Entities.Auditing;
- namespace IwbZero.Authorization.Base.Roles
- {
- [Table("Sys_RoleClaims")]
- public class RoleClaim : CreationAuditedEntity<long>, IMayHaveTenant
- {
- /// <summary>
- /// Maximum length of the <see cref="ClaimType"/> property.
- /// </summary>
- public const int MaxClaimTypeLength = 256;
- public virtual int? TenantId { get; set; }
- public virtual int RoleId { get; set; }
- [StringLength(MaxClaimTypeLength)]
- public virtual string ClaimType { get; set; }
- public virtual string ClaimValue { get; set; }
- public RoleClaim()
- {
- }
- public RoleClaim(RoleBase role, Claim claim)
- {
- TenantId = role.TenantId;
- RoleId = role.Id;
- ClaimType = claim.Type;
- ClaimValue = claim.Value;
- }
- }
- }
|