feat(backend): add problem/need submission module with workflow and events

Add submission CRUD with pagination and role scoping, challenge/location binding, automatic keyword extraction, a validated status workflow, and domain events for matchmaking and notifications. Create a problem record together with each submission.
This commit is contained in:
Rafał Tyński
2026-10-04 02:22:00 +02:00
parent 58cc2e4096
commit cadc321d96
12 changed files with 633 additions and 0 deletions
@@ -0,0 +1,7 @@
namespace TarninaHub.Application.Dtos;
public sealed record PagedResponse<T>(
IReadOnlyList<T> Items,
int Page,
int PageSize,
int Total);
@@ -0,0 +1,26 @@
using System.ComponentModel.DataAnnotations;
namespace TarninaHub.Application.Dtos;
public sealed record CreateSubmissionRequest(
[Required, StringLength(200, MinimumLength = 3)] string Title,
[Required, StringLength(4000, MinimumLength = 10)] string Description,
[Required] string ChallengeId,
[Required] string LocationId,
IReadOnlyList<string>? Keywords);
public sealed record UpdateSubmissionStatusRequest(
[Required] string Status);
public sealed record SubmissionResponse(
string Id,
string ProblemId,
string Title,
string Description,
string ChallengeId,
string LocationId,
string AuthorId,
string Status,
IReadOnlyList<string> Keywords,
DateTimeOffset CreatedAt,
DateTimeOffset? UpdatedAt);