Статистика для дашборда #7

This commit is contained in:
2026-04-28 21:31:22 +03:00
parent 967a024d0c
commit c87d56bb49
18 changed files with 210 additions and 167 deletions
+3
View File
@@ -4,6 +4,7 @@
-export([create/2, get_by_id/1, get_by_event_and_user/2, list_by_event/1, list_by_user/1]).
-export([update_status/2, delete/1]).
-export([generate_id/0]).
-export([count_bookings/0]).
%% Создание бронирования
create(EventId, UserId) ->
@@ -97,6 +98,8 @@ delete(Id) ->
{aborted, Reason} -> {error, Reason}
end.
count_bookings() -> mnesia:table_info(booking, size).
%% Внутренние функции
generate_id() ->
base64:encode(crypto:strong_rand_bytes(16), #{mode => urlsafe, padding => false}).