< Summary

Class:SVETA.Api.Data.Domain.MovementParam
Assembly:SVETA.Api
File(s):/opt/dev/sveta_api_build/SVETA.Api/Data/Domain/MovementParam.cs
Covered lines:8
Uncovered lines:51
Coverable lines:59
Total lines:133
Line coverage:13.5% (8 of 59)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodLine coverage Branch coverage
get_Id()0%100%
get_CustomerId()100%100%
get_ReceiverId()0%100%
get_SupplierId()0%100%
get_SenderId()0%100%
get_FromDate()0%100%
get_ToDate()0%100%
get_Kind()100%100%
get_StateId()0%100%
get_StatusId()100%100%
get_Page()0%100%
get_Limit()100%100%
get_Sort()0%100%
get_DocumentNumber()0%100%
get_ExcludedStatuses()100%100%
get_СontragentBuyerFilter()100%100%
get_ShowAnonym()100%100%
get_GenerateExcel()0%100%
.ctor()100%100%
.ctor(...)0%0%
.ctor(...)0%0%

File(s)

/opt/dev/sveta_api_build/SVETA.Api/Data/Domain/MovementParam.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Diagnostics.Eventing.Reader;
 4using System.Linq;
 5using System.Threading.Tasks;
 6using SVETA.Api.Helpers;
 7using WinSolutions.Sveta.Server.Data.DataModel.Kinds;
 8
 9namespace SVETA.Api.Data.Domain
 10{
 11    public class MovementParam
 12    {
 13        /// <summary>
 14        /// Идентификтор документа
 15        /// </summary>
 016        public long Id { get; set; }
 17        /// <summary>
 18        /// Идентификатор заказчика - контрагент
 19        /// </summary>
 320        public long CustomerId { get; set; }
 21        /// <summary>
 22        /// Идентификатор получателя - департамент
 23        /// </summary>
 024        public long ReceiverId { get; set; }
 25        /// <summary>
 26        /// Идентификатор поставщика - контрагент
 27        /// </summary>
 028        public long SupplierId { get; set; }
 29
 30        /// <summary>
 31        /// Идентификатор склада
 32        /// </summary>
 033        public long SenderId { get; set; }
 34        /// <summary>
 35        /// Дата начала отборки
 36        /// </summary>
 037        public DateTime FromDate { get; set; }
 38        /// <summary>
 39        /// Дата окончания отборки
 40        /// </summary>
 041        public DateTime ToDate { get; set; }
 42        /// <summary>
 43        /// Тип документов для отбора
 44        /// </summary>
 845        public MovementKind Kind { get; set; }
 46        /// <summary>
 47        /// Состояние записей документов для отборки
 48        /// </summary>
 049        public long StateId { get; set; }
 50        /// <summary>
 51        /// Статус документа для отборки
 52        /// </summary>
 753        public long StatusId { get; set; }
 54        /// <summary>
 55        /// текущая страница отборки
 56        /// </summary>
 057        public int Page { get; set; }
 58        /// <summary>
 59        /// Лимит отборки 1 -100
 60        /// </summary>
 661        public int Limit { get; set; }
 62        /// <summary>
 63        /// Тип сортировки умолчанию по id - id|desc,created_on,created_on|desc,state,state|desc,status,status|desc,cust
 64        /// </summary>
 065        public string Sort { get; set; }
 66        /// <summary>
 67        /// Номер документа
 68        /// </summary>
 069        public string DocumentNumber { get; set; }
 70        /// <summary>
 71        /// Статусы недоступные для пользователя
 72        /// </summary>
 473        public long[] ExcludedStatuses { get; set; }
 74
 75        /// <summary>
 76        /// Поиск контрагента покупателя
 77        /// </summary>
 378        public string СontragentBuyerFilter { get; set; }
 79
 80        /// <summary>
 81        /// Показывать анонимные заявки
 82        /// </summary>
 483        public string ShowAnonym { get; set; }
 84
 85        /// <summary>
 86        /// Выгрузка результата в excel
 87        /// </summary>
 088        public bool GenerateExcel { get; set; }
 89
 690        public MovementParam() { }
 91
 092        public MovementParam(long id, long customerId, long receiverId, long supplierId, long senderId, DateTime fromDat
 093            long stateId, long statusId, string documentNumber, int page, int limit, string sort, string contragentBuyer
 094            string showAnonym = "nonanonymous", bool generateExcel = false)
 095        {
 096            Id = id;
 097            CustomerId = customerId;
 098            ReceiverId = receiverId;
 099            SupplierId = supplierId;
 0100            SenderId = senderId;
 0101            FromDate = fromDate;
 0102            ToDate = toDate;
 0103            Kind = kind;
 0104            StateId = stateId;
 0105            StatusId = statusId;
 0106            Page = page;
 0107            Limit = limit < 1 ? 1 : limit > 100 && !generateExcel ? 100 : limit;
 0108            Sort = sort;
 0109            DocumentNumber = documentNumber;
 0110            СontragentBuyerFilter = contragentBuyerFilter;
 0111            ShowAnonym = showAnonym == default ? "nonanonymous" : showAnonym;
 0112            GenerateExcel = generateExcel;
 0113        }
 0114        public MovementParam(long customerId, long receiverId, long supplierId, long senderId, DateTime fromDate, DateTi
 0115            MovementKind kind, long stateId, long statusId, string documentNumber, string сontragentBuyerFilter = defaul
 0116            string showAnonym = "nonanonymous", bool generateExcel = false)
 0117        {
 0118            CustomerId = customerId;
 0119            ReceiverId = receiverId;
 0120            SupplierId = supplierId;
 0121            SenderId = senderId;
 0122            FromDate = fromDate;
 0123            ToDate = toDate;
 0124            Kind = kind;
 0125            StateId = stateId;
 0126            StatusId = statusId;
 0127            DocumentNumber = documentNumber;
 0128            СontragentBuyerFilter = сontragentBuyerFilter;
 0129            ShowAnonym = showAnonym == default ? "nonanonymous" : showAnonym;
 0130            GenerateExcel = generateExcel;
 0131        }
 132    }
 133}