using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using TakeoutSaaS.Application.Dictionary.Extensions;
using TakeoutSaaS.Infrastructure.Dictionary.Extensions;

namespace TakeoutSaaS.Module.Dictionary.Extensions;

/// <summary>
/// 字典模块服务扩展。
/// </summary>
public static class DictionaryModuleExtensions
{
    /// <summary>
    /// 注册字典模块应用层与基础设施。
    /// </summary>
    public static IServiceCollection AddDictionaryModule(this IServiceCollection services, IConfiguration configuration)
    {
        services.AddDictionaryApplication();
        services.AddDictionaryInfrastructure(configuration);
        return services;
    }
}
