using Hotline.Application.Contracts;
using Hotline.Application.Mappers;
using Hotline.Application.Systems;
using Mapster;
using Microsoft.Extensions.DependencyInjection;

namespace Hotline.Application
{
    public static class ApplicationStartupExtensions
    {
        public static IServiceCollection AddApplication(this IServiceCollection services)
        {
            services.AddScoped<BaseDataApplication>();
            TypeAdapterConfig.GlobalSettings.Scan(typeof(MapperConfigs).Assembly);
            return services.AddAppContracts();
        }
    }
}
