Create general structures in Mongo and SQL

This commit is contained in:
Sergio Matias Urquin
2025-05-18 15:49:46 -06:00
parent 144a6c14c0
commit c7953250fc
51 changed files with 370 additions and 365 deletions

View File

@@ -1,6 +1,6 @@
namespace Core.Blueprint.Service.External.Clients.Adapters
{
public class BlueprintAdapter
public class MongoSampleAdapter
{
public string Name { get; set; } = null!;
public string? Description { get; set; }

View File

@@ -1,6 +1,6 @@
namespace Core.Blueprint.Service.External.Clients.Adapters
{
public class UserProjectAdapter
public class SqlSampleAdapter
{
public string ProjectCode { get; set; } = null!;
public string ProjectDescription { get; set; } = null!;

View File

@@ -10,35 +10,35 @@ namespace Core.Blueprint.Service.External.Clients
{
public interface IBlueprintServiceClient
{
[Post("/v1/MongoBlueprint/Create")]
Task<BlueprintAdapter> CreateBlueprintAsync([FromBody] BlueprintRequest newBlueprint, CancellationToken cancellationToken = default);
[Post("/v1/MongoSample/Create")]
Task<MongoSampleAdapter> CreateMongoSampleAsync([FromBody] MongoSampleRequest newSample, CancellationToken cancellationToken = default);
[Get("/v1/MongoBlueprint/GetAll")]
Task<IEnumerable<BlueprintAdapter>> GetAllBlueprintsAsync(CancellationToken cancellationToken = default);
[Get("/v1/MongoSample/GetAll")]
Task<IEnumerable<MongoSampleAdapter>> GetAllMongoSamplesAsync(CancellationToken cancellationToken = default);
[Get("/v1/MongoBlueprint/{_id}/GetBy_Id")]
Task<BlueprintAdapter> GetBlueprintByIdAsync([FromRoute] string _id, CancellationToken cancellationToken = default);
[Get("/v1/MongoSample/{_id}/GetBy_Id")]
Task<MongoSampleAdapter> GetMongoSampleByIdAsync([FromRoute] string _id, CancellationToken cancellationToken = default);
[Put("/v1/MongoBlueprint/{_id}/Update")]
Task<BlueprintAdapter> UpdateBlueprintAsync([FromRoute] string _id, [FromBody] BlueprintAdapter entity, CancellationToken cancellationToken = default);
[Put("/v1/MongoSample/{_id}/Update")]
Task<MongoSampleAdapter> UpdateMongoSampleAsync([FromRoute] string _id, [FromBody] MongoSampleAdapter entity, CancellationToken cancellationToken = default);
[Delete("/v1/MongoBlueprint/{_id}/Delete")]
Task<BlueprintAdapter> DeleteBlueprintAsync([FromRoute] string _id, CancellationToken cancellationToken = default);
[Delete("/v1/MongoSample/{_id}/Delete")]
Task<MongoSampleAdapter> DeleteMongoSampleAsync([FromRoute] string _id, CancellationToken cancellationToken = default);
[Post("/v1/UserProject/Create")]
Task<UserProjectAdapter> CreateUserProjectAsync([FromBody] UserProjectRequest newUserProject, CancellationToken cancellationToken = default);
[Post("/v1/SqlSample/Create")]
Task<SqlSampleAdapter> CreateSqlSampleAsync([FromBody] SqlSampleRequest newSqlSample, CancellationToken cancellationToken = default);
[Get("/v1/UserProject/GetAll")]
Task<IEnumerable<UserProjectAdapter>> GetAllUserProjectsAsync(CancellationToken cancellationToken = default);
[Get("/v1/SqlSample/GetAll")]
Task<IEnumerable<SqlSampleAdapter>> GetAllSqlSamplesAsync(CancellationToken cancellationToken = default);
[Get("/v1/UserProject/{id}/GetById")]
Task<UserProjectAdapter> GetUserProjectByIdAsync([FromRoute] int id, CancellationToken cancellationToken = default);
[Get("/v1/SqlSample/{id}/GetById")]
Task<SqlSampleAdapter> GetSqlSampleByIdAsync([FromRoute] int id, CancellationToken cancellationToken = default);
[Put("/v1/UserProject/{id}/Update")]
Task<UserProjectAdapter> UpdateUserProjectAsync([FromRoute] int id, [FromBody] UserProjectAdapter entity, CancellationToken cancellationToken = default);
[Put("/v1/SqlSample/{id}/Update")]
Task<SqlSampleAdapter> UpdateSqlSampleAsync([FromRoute] int id, [FromBody] SqlSampleAdapter entity, CancellationToken cancellationToken = default);
[Delete("/v1/UserProject/{id}/Delete")]
Task<UserProjectAdapter> DeleteUserProjectAsync([FromRoute] int id, CancellationToken cancellationToken = default);
[Delete("/v1/SqlSample/{id}/Delete")]
Task<SqlSampleAdapter> DeleteSqlSampleAsync([FromRoute] int id, CancellationToken cancellationToken = default);
[Post("/v1/KeyVault/CreateSecret")]
Task<KeyVaultResponse> CreateSecretAsync([FromBody] KeyVaultRequest newKeyVault, CancellationToken cancellationToken = default);

View File

@@ -1,6 +1,6 @@
namespace Core.Blueprint.Service.External.Clients.Requests
{
public class BlueprintRequest
public class MongoSampleRequest
{
public string Name { get; set; } = null!;
public string? Description { get; set; }

View File

@@ -0,0 +1,8 @@
namespace Core.Blueprint.Service.External.Clients.Requests
{
public class SqlSampleRequest
{
public string Name { get; set; } = null!;
public string Description { get; set; } = null!;
}
}

View File

@@ -1,9 +0,0 @@
namespace Core.Blueprint.Service.External.Clients.Requests
{
public class UserProjectRequest
{
public string ProjectCode { get; set; } = null!;
public string ProjectDescription { get; set; } = null!;
public string UserId { get; set; } = null!;
}
}