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,13 @@
|
||||
namespace TarninaHub.Domain.Rules;
|
||||
|
||||
public static class ApplicationWindow
|
||||
{
|
||||
public const string Open = "open";
|
||||
|
||||
/// <summary>
|
||||
/// Applications are only allowed while the call is open and the current
|
||||
/// moment is within [opensAt, closesAt].
|
||||
/// </summary>
|
||||
public static bool IsOpen(string status, DateTimeOffset opensAt, DateTimeOffset closesAt, DateTimeOffset now) =>
|
||||
string.Equals(status, Open, StringComparison.Ordinal) && now >= opensAt && now <= closesAt;
|
||||
}
|
||||
Reference in New Issue
Block a user