using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudBuilder.Core.DependencyInjection.EFCore
{
    /// <summary>
    /// 每一个模块注册从库实体类
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface ISecondaryRegistEntityType<T>
    {
        /// <summary>
        /// 注入所有Entity实体类,调用AddEntityType和RegistKeys
        /// </summary>
        /// <param name="builder"></param>
        void RegistEntity(T builder);

        /// <summary>
        /// 如果Entity实体类不是单一主键，要单独重写注入(自动生成)
        /// </summary>
        /// <param name="builder"></param>
        void RegistKeys(T builder);

        /// <summary>
        /// 注入所有Entity实体类
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="assemblyName"></param>
        void AddEntityType(T builder, string assemblyName);
    }
}