Статистика для дашборда #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
+4
View File
@@ -4,6 +4,7 @@
-export([create/4, create_recurring/5, get_by_id/1, list_by_calendar/1,
update/2, delete/1, materialize_occurrence/3]).
-export([generate_id/0]).
-export([count_events/0]).
%% Создание одиночного события
create(CalendarId, Title, StartTime, Duration) ->
@@ -167,6 +168,9 @@ update(Id, Updates) ->
delete(Id) ->
update(Id, [{status, deleted}]).
count_events() ->
mnesia:table_info(event, size).
%% Внутренние функции
generate_id() ->
base64:encode(crypto:strong_rand_bytes(16), #{mode => urlsafe, padding => false}).