feat(api): TemplateHistoryController
This commit is contained in:
@@ -73,6 +73,11 @@
|
||||
public const string getParam = "{id}";
|
||||
}
|
||||
|
||||
public static class TemplateHistory
|
||||
{
|
||||
public const string GetAll = Base + "/template-histories/";
|
||||
}
|
||||
|
||||
public static class TemplateScheduleEspp
|
||||
{
|
||||
public const string Get = Base + "/templates/" + templateId + "/schedule-esppid";
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using PARR.Constants;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
public class TemplateHistoryQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// ИД шаблона
|
||||
/// </summary>
|
||||
public Guid? TemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IP инициатора
|
||||
/// </summary>
|
||||
public string? InitiatorIp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ИД компонента ПАРР
|
||||
/// </summary>
|
||||
public ParrComponentsEnum? ParrComponentId { get; set; }
|
||||
}
|
||||
}
|
||||
12
PARR.API/Contracts/V1/Responses/HistoryInitiatorResponse.cs
Normal file
12
PARR.API/Contracts/V1/Responses/HistoryInitiatorResponse.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class HistoryInitiatorResponse
|
||||
{
|
||||
public string? Ip { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
public int? ParrComponentId { get; set; }
|
||||
|
||||
public ParrComponentResponse? ParrComponent { get; set; }
|
||||
public UserBaseResponse? User { get; set; }
|
||||
}
|
||||
}
|
||||
9
PARR.API/Contracts/V1/Responses/ParrComponentResponse.cs
Normal file
9
PARR.API/Contracts/V1/Responses/ParrComponentResponse.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class ParrComponentResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public required string Description { get; set; }
|
||||
}
|
||||
}
|
||||
25
PARR.API/Contracts/V1/Responses/TemplateHistoryResponse.cs
Normal file
25
PARR.API/Contracts/V1/Responses/TemplateHistoryResponse.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class TemplateHistoryResponse
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid TemplateId { get; set; }
|
||||
|
||||
public DateTimeOffset DateAddedToHistory { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public bool IsActiveTemplate { get; set; }
|
||||
|
||||
public bool IsActiveSchedule { get; set; }
|
||||
|
||||
public DateTimeOffset? LastRun { get; set; }
|
||||
|
||||
public DateTimeOffset NextRun { get; set; }
|
||||
|
||||
public HistoryInitiatorResponse? Initiator { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user