This commit is contained in:
2023-05-31 10:19:05 +08:00
parent 1b65a7a9e5
commit 9c621c75cd
238 changed files with 9905 additions and 4034 deletions

View File

@@ -1,4 +1,5 @@
using JNPF.DependencyInjection;
using JNPF.Extras.DatabaseAccessor.SqlSugar.Models;
using SqlSugar;
namespace JNPF.Common.Contracts;
@@ -7,7 +8,7 @@ namespace JNPF.Common.Contracts;
/// 实体类基类.
/// </summary>
[SuppressSniffer]
public abstract class EntityBase<TKey> : IEntity<TKey>
public abstract class EntityBase<TKey> : ITenantFilter, IEntity<TKey>
where TKey : IEquatable<TKey>
{
/// <summary>
@@ -15,4 +16,10 @@ public abstract class EntityBase<TKey> : IEntity<TKey>
/// </summary>
[SugarColumn(ColumnName = "F_Id", ColumnDescription = "主键", IsPrimaryKey = true)]
public TKey Id { get; set; }
/// <summary>
/// 获取或设置 租户id.
/// </summary>
[SugarColumn(ColumnName = "F_TenantId", ColumnDescription = "租户id")]
public string TenantId { get; set; }
}