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.
27 lines
771 B
C#
27 lines
771 B
C#
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);
|