feat(backend): add communication, tester, admin and middleman modules
Implement step 17 modules: threads/messages, notifications with automation (submission.created, idea.created, grant_call.opened), innovation test feedback, admin panel (submissions, verify, metrics, grant call status), Middleman adaptation and partnerships. Split multi-type files into one type per file and replace object-valued dictionaries with string-valued maps in data contracts (migrations 0006/0007).
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using TarninaHub.Domain.Enums;
|
||||
|
||||
namespace TarninaHub.Application.Mappings;
|
||||
|
||||
public static class PartnershipStatusWire
|
||||
{
|
||||
public static string ToWire(this PartnershipStatus status) => status switch
|
||||
{
|
||||
PartnershipStatus.Proposed => "proposed",
|
||||
PartnershipStatus.Active => "active",
|
||||
PartnershipStatus.Closed => "closed",
|
||||
_ => "proposed",
|
||||
};
|
||||
|
||||
public static PartnershipStatus? Parse(string? value) => value?.Trim().ToLowerInvariant() switch
|
||||
{
|
||||
"proposed" => PartnershipStatus.Proposed,
|
||||
"active" => PartnershipStatus.Active,
|
||||
"closed" => PartnershipStatus.Closed,
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user