WellOperationRequest move copeCtor to WellOperationRequestBase

This commit is contained in:
ngfrolov 2024-03-12 17:21:05 +05:00
parent 056add796d
commit a03e9bb7f2
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -6,7 +6,7 @@ namespace AsbCloudApp.Requests
/// <summary>
/// параметры для запроса списка операций
/// </summary>
public class WellOperationRequestBase: RequestBase
public class WellOperationRequestBase : RequestBase
{
/// <summary>
/// фильтр по дате начала операции
@ -42,12 +42,40 @@ namespace AsbCloudApp.Requests
/// фильтр по списку id конструкций секции
/// </summary>
public IEnumerable<int>? SectionTypeIds { get; set; }
/// <summary>
/// Параметры для запроса списка операций.
/// Базовый конструктор
/// </summary>
public WellOperationRequestBase()
{ }
/// <summary>
/// Параметры для запроса списка операций.
/// Копирующий конструктор
/// </summary>
/// <param name="request"></param>
public WellOperationRequestBase(WellOperationRequestBase request)
{
GeDepth = request.GeDepth;
LeDepth = request.LeDepth;
GeDate = request.GeDate;
LtDate = request.LtDate;
OperationCategoryIds = request.OperationCategoryIds;
OperationType = request.OperationType;
SectionTypeIds = request.SectionTypeIds;
Skip = request.Skip;
Take = request.Take;
SortFields = request.SortFields;
}
}
/// <summary>
/// Параметры для запроса списка операций (с id скважины)
/// </summary>
public class WellOperationRequest: WellOperationRequestBase
public class WellOperationRequest : WellOperationRequestBase
{
/// <summary>
/// id скважины
@ -57,7 +85,7 @@ namespace AsbCloudApp.Requests
/// <summary>
/// ctor
/// </summary>
public WellOperationRequest(){}
public WellOperationRequest() { }
/// <summary>
/// копирующий конструктор
@ -65,21 +93,9 @@ namespace AsbCloudApp.Requests
/// <param name="request"></param>
/// <param name="idWell"></param>
public WellOperationRequest(WellOperationRequestBase request, int idWell)
:base(request)
{
this.IdWell = idWell;
this.GeDepth = request.GeDepth;
this.LeDepth = request.LeDepth;
this.GeDate = request.GeDate;
this.LtDate = request.LtDate;
this.OperationCategoryIds = request.OperationCategoryIds;
this.OperationType = request.OperationType;
this.SectionTypeIds = request.SectionTypeIds;
this.Skip= request.Skip;
this.Take= request.Take;
this.SortFields = request.SortFields;
IdWell = idWell;
}
}