Рефакторинг обработчиков. Часть 2 #21
This commit is contained in:
@@ -9,14 +9,14 @@
|
||||
password_hash :: binary(),
|
||||
role :: user | bot,
|
||||
status :: active | frozen | deleted,
|
||||
reason :: binary() | undefined,
|
||||
nickname :: binary() | undefined,
|
||||
avatar_url :: binary() | undefined,
|
||||
timezone :: binary() | undefined,
|
||||
language :: binary() | undefined,
|
||||
social_links :: [binary()] | undefined,
|
||||
phone :: binary() | undefined,
|
||||
preferences :: map() | undefined,
|
||||
reason :: binary(),
|
||||
nickname :: binary(),
|
||||
avatar_url :: binary() | default,
|
||||
timezone :: binary(),
|
||||
language :: binary(),
|
||||
social_links :: [binary()],
|
||||
phone :: binary(),
|
||||
preferences :: map(),
|
||||
last_login :: calendar:datetime(),
|
||||
created_at :: calendar:datetime(),
|
||||
updated_at :: calendar:datetime()
|
||||
@@ -36,12 +36,12 @@
|
||||
password_hash :: binary(),
|
||||
role :: superadmin | admin | moderator | support,
|
||||
status :: active | blocked,
|
||||
nickname :: binary() | undefined,
|
||||
avatar_url :: binary() | undefined,
|
||||
timezone :: binary() | undefined,
|
||||
language :: binary() | undefined,
|
||||
phone :: binary() | undefined,
|
||||
preferences :: map() | undefined,
|
||||
nickname :: binary(),
|
||||
avatar_url :: binary() | default,
|
||||
timezone :: binary(),
|
||||
language :: binary(),
|
||||
phone :: binary(),
|
||||
preferences :: map(),
|
||||
last_login :: calendar:datetime(),
|
||||
created_at :: calendar:datetime(),
|
||||
updated_at :: calendar:datetime()
|
||||
@@ -61,18 +61,18 @@
|
||||
owner_id :: binary(),
|
||||
title :: binary(),
|
||||
description :: binary(),
|
||||
short_name :: binary() | undefined,
|
||||
category :: binary() | undefined,
|
||||
color :: binary() | undefined,
|
||||
image_url :: binary() | undefined,
|
||||
settings :: map() | undefined,
|
||||
short_name :: binary(),
|
||||
category :: binary(),
|
||||
color :: binary(),
|
||||
image_url :: binary(),
|
||||
settings :: map(),
|
||||
tags :: [binary()],
|
||||
type :: personal | commercial,
|
||||
confirmation :: auto | manual | {timeout, integer()}, % секунд
|
||||
rating_avg :: float(),
|
||||
rating_count :: non_neg_integer(),
|
||||
status :: active | frozen | deleted,
|
||||
reason :: binary() | undefined,
|
||||
reason :: binary(),
|
||||
created_at :: calendar:datetime(),
|
||||
updated_at :: calendar:datetime()
|
||||
}).
|
||||
@@ -88,7 +88,7 @@
|
||||
calendar_id :: binary(),
|
||||
user_id :: binary(), % id пользователя-специалиста
|
||||
name :: binary(), % отображаемое имя в этом календаре
|
||||
specialization :: [binary()] | undefined, % список специализаций (услуг)
|
||||
specialization :: [binary()], % список специализаций (услуг)
|
||||
status :: active | inactive,
|
||||
added_at :: calendar:datetime(),
|
||||
updated_at :: calendar:datetime()
|
||||
@@ -109,20 +109,20 @@
|
||||
event_type :: single | recurring,
|
||||
start_time :: calendar:datetime(),
|
||||
duration :: integer(), % минуты
|
||||
recurrence_rule :: binary() | undefined,
|
||||
master_id :: binary() | undefined,
|
||||
recurrence_rule :: binary(),
|
||||
master_id :: binary(),
|
||||
is_instance :: boolean(),
|
||||
specialist_id :: binary() | undefined,
|
||||
location :: #location{} | undefined,
|
||||
specialist_id :: binary(),
|
||||
location :: #location{},
|
||||
tags :: [binary()],
|
||||
capacity :: integer() | undefined,
|
||||
online_link :: binary() | undefined,
|
||||
capacity :: integer(),
|
||||
online_link :: binary(),
|
||||
status :: active | cancelled | completed,
|
||||
reason :: binary() | undefined,
|
||||
reason :: binary(),
|
||||
rating_avg :: float(),
|
||||
rating_count :: non_neg_integer(),
|
||||
attachments :: [binary()] | undefined,
|
||||
edit_history :: [map()] | undefined,
|
||||
attachments :: [binary()],
|
||||
edit_history :: [map()],
|
||||
created_at :: calendar:datetime(),
|
||||
updated_at :: calendar:datetime()
|
||||
}).
|
||||
@@ -131,7 +131,7 @@
|
||||
master_id :: binary(),
|
||||
original_start :: calendar:datetime(),
|
||||
action :: cancel | reschedule,
|
||||
new_start :: calendar:datetime() | undefined
|
||||
new_start :: calendar:datetime()
|
||||
}).
|
||||
|
||||
%% ------------------- Бронирования ------------------------------------
|
||||
@@ -140,9 +140,9 @@
|
||||
event_id :: binary(), % ссылка на конкретный экземпляр события
|
||||
user_id :: binary(),
|
||||
status :: pending | confirmed | cancelled,
|
||||
notes :: binary() | undefined,
|
||||
notes :: binary(),
|
||||
reminder_sent :: boolean(),
|
||||
confirmed_at :: calendar:datetime() | undefined,
|
||||
confirmed_at :: calendar:datetime(),
|
||||
created_at :: calendar:datetime(),
|
||||
updated_at :: calendar:datetime()
|
||||
}).
|
||||
@@ -156,7 +156,7 @@
|
||||
rating :: 1..5,
|
||||
comment :: binary(),
|
||||
status :: visible | hidden | deleted,
|
||||
reason :: binary() | undefined,
|
||||
reason :: binary(),
|
||||
likes :: non_neg_integer(),
|
||||
dislikes :: non_neg_integer(),
|
||||
created_at :: calendar:datetime(),
|
||||
@@ -172,15 +172,15 @@
|
||||
reason :: binary(),
|
||||
status :: pending | reviewed | dismissed,
|
||||
created_at :: calendar:datetime(),
|
||||
resolved_at :: calendar:datetime() | undefined,
|
||||
resolved_by :: binary() | undefined
|
||||
resolved_at :: calendar:datetime(),
|
||||
resolved_by :: binary()
|
||||
}).
|
||||
|
||||
-record(banned_word, {
|
||||
id :: binary(),
|
||||
word :: binary(),
|
||||
added_by :: binary() | undefined, % id администратора, добавившего слово
|
||||
added_at :: calendar:datetime() | undefined
|
||||
added_by :: binary(), % id администратора, добавившего слово
|
||||
added_at :: calendar:datetime()
|
||||
}).
|
||||
|
||||
%% ------------------- Баг-трекер --------------------------------------
|
||||
@@ -195,8 +195,8 @@
|
||||
first_seen :: calendar:datetime(),
|
||||
last_seen :: calendar:datetime(),
|
||||
status :: open | in_progress | resolved | closed,
|
||||
assigned_to :: binary() | undefined,
|
||||
resolution_note :: binary() | undefined
|
||||
assigned_to :: binary(),
|
||||
resolution_note :: binary()
|
||||
}).
|
||||
|
||||
%% ------------------- Подписки ----------------------------------------
|
||||
@@ -223,10 +223,10 @@
|
||||
entity_id :: binary(),
|
||||
timestamp :: calendar:datetime(),
|
||||
ip :: binary(),
|
||||
reason :: binary() | undefined
|
||||
reason :: binary()
|
||||
}).
|
||||
|
||||
%% ------------------- Уведомления (задача #12) ------------------------
|
||||
%% ------------------- Уведомления ------------------------
|
||||
-record(notification, {
|
||||
id :: binary(),
|
||||
user_id :: binary(),
|
||||
|
||||
Reference in New Issue
Block a user