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.
14 lines
495 B
C#
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;
|
|
}
|