feat(backend): restructure API into layers with OpenAPI, versioning and error handling
Split the backend into API host, Domain, Application and Infrastructure projects. Add Swagger/OpenAPI per API version, Asp.Versioning (query/header), ProblemDetails with a global exception handler and SurrealQL migrations applied at startup (namespace/database ensured). Infrastructure owns the SurrealDB client, settings and DI.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum ApplicationStatus
|
||||
{
|
||||
Draft,
|
||||
Submitted,
|
||||
Accepted,
|
||||
Rejected,
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum DocumentScope
|
||||
{
|
||||
Local,
|
||||
Partial,
|
||||
Full,
|
||||
Anonymized,
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum GrantCallStatus
|
||||
{
|
||||
Planned,
|
||||
Open,
|
||||
Closed,
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum IdeaStatus
|
||||
{
|
||||
Draft,
|
||||
Submitted,
|
||||
InReview,
|
||||
Accepted,
|
||||
Rejected,
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum InnovationStage
|
||||
{
|
||||
Idea,
|
||||
Pilot,
|
||||
Scaling,
|
||||
Service,
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum LocationKind
|
||||
{
|
||||
Gmina,
|
||||
Powiat,
|
||||
Wojewodztwo,
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum PartnershipStatus
|
||||
{
|
||||
Proposed,
|
||||
Active,
|
||||
Closed,
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum SubmissionStatus
|
||||
{
|
||||
New,
|
||||
Triaged,
|
||||
Matched,
|
||||
InProgress,
|
||||
Closed,
|
||||
Rejected,
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum TagGroup
|
||||
{
|
||||
Audience,
|
||||
Topic,
|
||||
Stage,
|
||||
Sector,
|
||||
Cross,
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace TarninaHub.Domain.Enums;
|
||||
|
||||
public enum UserRole
|
||||
{
|
||||
User,
|
||||
Jst,
|
||||
Operator,
|
||||
Manager,
|
||||
Admin,
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user