Files
Rafał Tyński 127ca92f63 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.
2026-10-04 03:13:45 +02:00

14 lines
495 B
C#

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;
}