using Microsoft.Extensions.DependencyInjection;
using NPin.Framework.Mapster;
using NPin.Framework.Upms.Domain.Shared.Options;
using Volo.Abp.Domain;

namespace NPin.Framework.Upms.Domain.Shared;

[DependsOn(
    typeof(AbpDddDomainSharedModule),
    typeof(NPinFrameworkMapsterModule)
)]
public class NPinFrameworkUpmsDomainSharedModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        var configuration = context.Services.GetConfiguration();
        // 配置文件读取
        Configure<JwtOptions>(configuration.GetSection(nameof(JwtOptions)));
        Configure<RefreshJwtOptions>(configuration.GetSection(nameof(RefreshJwtOptions)));
        Configure<UpmsOptions>(configuration.GetSection(nameof(UpmsOptions)));
    }
}