| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System.ComponentModel.DataAnnotations;
- using System.Threading.Tasks;
- using Abp.Domain.Uow;
- using Abp.MultiTenancy;
- using WeApp.Authorization.Users;
- using WeApp.Configuration;
- using IwbZero.Authorization.Roles;
- using IwbZero.Zero.Configuration;
- using Microsoft.AspNet.Identity;
- namespace WeApp.Authorization.Roles
- {
- public class Role : IwbSysRole<User>
- {
- public const int MaxDescriptionLength = 5000;
- public Role()
- {
- }
- public Role(int? tenantId, string displayName)
- : base(tenantId, displayName)
- {
- }
- public Role(int? tenantId, string name, string displayName)
- : base(tenantId, name, displayName)
- {
- }
- [MaxLength(MaxDescriptionLength)]
- public string Description { get; set; }
- [UnitOfWork]
- public static Role CreateStaticRoles(int tenantId)
- {
- return new Role
- {
- TenantId = tenantId,
- AccountType = AccountTypeDefinition.System,
- RoleType = UsersAndRolesTypeDefinition.Supper,
- IsStatic = true
- }; ;
- }
- }
- }
|