namespace Dpz.Core.Entity.Base.Indexes;

/// <summary>
/// 标记实体需要 MongoDB 索引,实体类实现此接口以声明索引定义
/// </summary>
/// <typeparam name="T">实体类型</typeparam>
public interface IIndexedEntity<T>
    where T : IBaseEntity
{
    /// <summary>
    /// 获取索引定义列表
    /// </summary>
    static abstract IReadOnlyList<EntityIndexDefinition> GetIndexDefinitions();
}
评论加载中...