Implement commercial calendars: booking_open, specialists, expire without type downgrade.
CI / test (push) Successful in 6m44s
CI / deploy-ift (push) Successful in 4m2s
CI / e2e-ift (push) Successful in 1m25s
CI / deploy-stage (push) Successful in 2m25s
CI / e2e-stage (push) Successful in 1m12s

Refs EventHub/EventHubBack#54
This commit is contained in:
2026-07-22 16:12:52 +03:00
parent fdb08eb453
commit af5f506866
35 changed files with 978 additions and 207 deletions
Regular → Executable
+7 -1
View File
@@ -443,7 +443,8 @@ calendar_to_json(Calendar) ->
settings => Calendar#calendar.settings,
tags => Calendar#calendar.tags,
type => Calendar#calendar.type,
confirmation => Calendar#calendar.confirmation,
confirmation => confirmation_to_json(Calendar#calendar.confirmation),
booking_open => logic_calendar:booking_open(Calendar),
rating_avg => Calendar#calendar.rating_avg,
rating_count => Calendar#calendar.rating_count,
status => Calendar#calendar.status,
@@ -452,6 +453,11 @@ calendar_to_json(Calendar) ->
updated_at => datetime_to_iso8601(Calendar#calendar.updated_at)
}.
confirmation_to_json(auto) -> <<"auto">>;
confirmation_to_json(manual) -> <<"manual">>;
confirmation_to_json({timeout, N}) when is_integer(N) -> #{<<"timeout">> => N};
confirmation_to_json(Other) -> Other.
%% @doc Преобразует #subscription{} в JSON-карту.
-spec subscription_to_json(#subscription{}) -> map().
subscription_to_json(Subscription) ->