Initial commit: Add project files
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using FastEndpoints;
|
||||
using KArtSell.Modules.ModelOperations.Domain;
|
||||
|
||||
namespace KArtSell.Modules.ModelOperations.Features.GetModelOperationsPlan;
|
||||
|
||||
public sealed class Endpoint : EndpointWithoutRequest<Response>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Get("/internal/v1/model-operations/plan");
|
||||
Roles("Quant", "Risk", "System", "Auditor");
|
||||
Description(x => x.WithTags("ModelOperations"));
|
||||
}
|
||||
|
||||
public override Task HandleAsync(CancellationToken ct)
|
||||
{
|
||||
var items = ModelOperationRegistry.All.Select(x => new OperationItem(
|
||||
x.OperationCode,
|
||||
x.Name,
|
||||
x.Cadence.ToContractValue(),
|
||||
x.AutomationMode.ToContractValue(),
|
||||
x.Queue,
|
||||
x.PrimaryOwner,
|
||||
x.SecondaryOwner,
|
||||
x.RequiredEvidence,
|
||||
x.Output,
|
||||
x.Gate)).ToArray();
|
||||
|
||||
return Send.OkAsync(new Response(
|
||||
"RESEARCH_CANDIDATE_NOT_PRODUCTION",
|
||||
"AUTOMATIC_ORDER_AND_KIS_SUBMISSION_OFF",
|
||||
"EVALUATION_AND_PROPOSAL_ONLY_HUMAN_APPROVAL_REQUIRED",
|
||||
items), ct);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user