feat(ideas): add idea creator, grant calls and applications
Implement the idea creator and application generator: idea status workflow, social canvas card, grant call windows with 409 when closed, and an LLM-backed idea assistant with offline fallback.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using TarninaHub.Domain.Enums;
|
||||
|
||||
namespace TarninaHub.Application.Mappings;
|
||||
|
||||
public static class IdeaStatusWire
|
||||
{
|
||||
public static string ToWire(this IdeaStatus status) => status switch
|
||||
{
|
||||
IdeaStatus.Draft => "draft",
|
||||
IdeaStatus.Submitted => "submitted",
|
||||
IdeaStatus.InReview => "in_review",
|
||||
IdeaStatus.Accepted => "accepted",
|
||||
IdeaStatus.Rejected => "rejected",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(status), status, null),
|
||||
};
|
||||
|
||||
public static IdeaStatus? Parse(string? value) => value switch
|
||||
{
|
||||
"draft" => IdeaStatus.Draft,
|
||||
"submitted" => IdeaStatus.Submitted,
|
||||
"in_review" => IdeaStatus.InReview,
|
||||
"accepted" => IdeaStatus.Accepted,
|
||||
"rejected" => IdeaStatus.Rejected,
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user