< Summary

Information
Class: Services.AiAssistant.AiFilterCriteriaMapper
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/AiAssistant/AiFilterCriteriaMapper.cs
Line coverage
100%
Covered lines: 24
Uncovered lines: 0
Coverable lines: 24
Total lines: 32
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ToOrderFilterModel(...)100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/AiAssistant/AiFilterCriteriaMapper.cs

#LineLine coverage
 1using OServices.FiltersServices.FilterModels;
 2
 3namespace Services.AiAssistant;
 4
 5/// <summary>Маппинг AiOrderFilterCriteria → OrderFilterModel для предзаполнения фильтров таблицы заказов.</summary>
 6public static class AiFilterCriteriaMapper
 7{
 208    public static OrderFilterModel ToOrderFilterModel(AiOrderFilterCriteria c) => new()
 209    {
 2010        Supplier             = c.SupplierName,
 2011        AppStatus            = c.AppStatusName,
 2012        OzonClient           = c.OzonClientName,
 2013        ShipmentWarehouse    = c.ShipmentWarehouseName,
 2014        ProductName          = c.ProductName,
 2015        Article              = c.Article,
 2016        Manufacturer         = c.ManufacturerName,
 2017        NewCategory          = c.NewCategory,
 2018        DeliveryCity         = c.DeliveryCity,
 2019        DeliveryName         = c.DeliveryName,
 2020        Provider             = c.DeliveryProviderName,
 2021        ProfitMin            = c.ProfitMin,
 2022        ProfitMax            = c.ProfitMax,
 2023        OnlyNegativeProfit   = c.OnlyNegativeProfit ?? false,
 2024        ShippingDateFrom     = c.ShippingDateFrom,
 2025        ShippingDateTo       = c.ShippingDateTo,
 2026        LastMonths           = c.LastMonths,
 2027        IncludeArchived      = c.IncludeArchived,
 2028        OnlyWithReturns      = c.OnlyWithReturns ?? false,
 2029        OnlyWithTrackingNumber = c.OnlyWithTrackingNumber ?? false,
 2030        GroupByShipment      = true,
 2031    };
 32}