feat(wbs): Vue 3 CRUD templates and OpenAPI Axios client refactoring
This commit is contained in:
@@ -305,3 +305,38 @@ public class StartCollectionRunEndpoint : EndpointWithoutRequest<StartCollection
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class FactorVersionDto
|
||||
{
|
||||
public string VersionId { get; set; } = string.Empty;
|
||||
public string CreatedAt { get; set; } = string.Empty;
|
||||
public string Status { get; set; } = "ACTIVE";
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class GetFactorVersionsResponse
|
||||
{
|
||||
public List<FactorVersionDto> Versions { get; set; } = new();
|
||||
}
|
||||
|
||||
public class GetFactorVersionsEndpoint : EndpointWithoutRequest<GetFactorVersionsResponse>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Get("/api/factors/versions");
|
||||
AllowAnonymous();
|
||||
Description(d => d.Produces<GetFactorVersionsResponse>(200));
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(CancellationToken ct)
|
||||
{
|
||||
var versions = new List<FactorVersionDto>
|
||||
{
|
||||
new() { VersionId = "FACTOR-V4.2", CreatedAt = DateTime.UtcNow.AddDays(-2).ToString("yyyy-MM-dd"), Status = "ACTIVE", Description = "최신 팩터 산출 공식 V4.2" },
|
||||
new() { VersionId = "FACTOR-V4.1", CreatedAt = DateTime.UtcNow.AddDays(-12).ToString("yyyy-MM-dd"), Status = "ARCHIVED", Description = "이전 보정 공식 V4.1" },
|
||||
new() { VersionId = "FACTOR-V4.0", CreatedAt = DateTime.UtcNow.AddDays(-30).ToString("yyyy-MM-dd"), Status = "ARCHIVED", Description = "기초 팩터 공식 V4.0" }
|
||||
};
|
||||
await SendOkAsync(new GetFactorVersionsResponse { Versions = versions }, ct);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user