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.
 
 
 
Tiobon.Web.Core/Tiobon.Core.Model/Tenants/MultiTenantAttribute.cs

24 lines
557 B

using System;
namespace Tiobon.Core.Model.Tenants;
/// <summary>
/// 标识 多租户 的业务表 <br/>
/// 默认设置是多库 <br/>
/// 公共表无需区分 直接使用主库 各自业务在各自库中 <br/>
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class MultiTenantAttribute : Attribute
{
public MultiTenantAttribute()
{
}
public MultiTenantAttribute(TenantTypeEnum tenantType)
{
TenantType = tenantType;
}
public TenantTypeEnum TenantType { get; set; } = TenantTypeEnum.Db;
}