Ролевая модель и аудит Часть 1.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
id :: binary(),
|
||||
email :: binary(),
|
||||
password_hash :: binary(),
|
||||
role :: user | admin,
|
||||
role :: user | bot,
|
||||
status :: active | frozen | deleted,
|
||||
created_at :: calendar:datetime(),
|
||||
updated_at :: calendar:datetime()
|
||||
@@ -20,6 +20,25 @@
|
||||
type :: access | refresh
|
||||
}).
|
||||
|
||||
%% ------------------- АДМИНИСТРАТОРЫ ------------------------------------
|
||||
-record(admin, {
|
||||
id :: binary(),
|
||||
email :: binary(),
|
||||
password_hash :: binary(),
|
||||
role :: superadmin | moderator | support,
|
||||
status :: active | blocked,
|
||||
created_at :: calendar:datetime(),
|
||||
updated_at :: calendar:datetime()
|
||||
}).
|
||||
|
||||
%% ------------------- СЕССИИ АДМИНИСТРАТОРОВ ---------------------------
|
||||
-record(admin_session, {
|
||||
token :: binary(),
|
||||
admin_id :: binary(),
|
||||
expires_at :: calendar:datetime(),
|
||||
type :: refresh
|
||||
}).
|
||||
|
||||
%% ------------------- Календари ---------------------------------------
|
||||
-record(calendar, {
|
||||
id :: binary(),
|
||||
|
||||
Reference in New Issue
Block a user