Abp模块
abp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

60 lines
1.6 KiB

using JetBrains.Annotations;
using System;
using System.ComponentModel;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;
namespace Sanhe.Abp.MenuManagement
{
/// <summary>
/// 菜单分配
/// </summary>
[DisplayName("菜单分配")]
public class MenuGrant : Entity<Guid>, IMultiTenant
{
/// <summary>
/// 租户Id
/// </summary>
[DisplayName("租户Id")]
public virtual Guid? TenantId { get; protected set; }
/// <summary>
/// 菜单Id
/// </summary>
[DisplayName("菜单Id")]
[NotNull]
public virtual Guid MenuId { get; protected set; }
/// <summary>
/// 提供器名称
/// </summary>
[DisplayName("提供器名称")]
[NotNull]
public virtual string ProviderName { get; protected set; }
/// <summary>
/// 提供器Key
/// </summary>
[DisplayName("提供器Key")]
[CanBeNull]
public virtual string ProviderKey { get; protected internal set; }
protected MenuGrant()
{
}
public MenuGrant(
Guid id,
[NotNull] Guid menuId,
[NotNull] string providerName,
[CanBeNull] string providerKey,
Guid? tenantId = null)
{
Check.NotNull(menuId, nameof(menuId));
Id = id;
MenuId = menuId;
ProviderName = Check.NotNullOrWhiteSpace(providerName, nameof(providerName));
ProviderKey = providerKey;
TenantId = tenantId;
}
}
}