notifications

-1 rows


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 null
user_id uuid 2147483647 null
users.id notifications_user_id_fkey C
type varchar 50 null

Тип уведомления: email, draw_result, invite, message, gift_sent, gift_received, vote

title text 2147483647 null
message text 2147483647 null
is_read bool 1 null
data jsonb 2147483647 null

Дополнительные данные уведомления (JSONB)

created_at timestamptz 35,6 null
updated_at timestamptz 35,6 now()

Indexes

Constraint Name Type Sort Column(s)
notifications_pkey Primary key Asc id
ix_notifications_created_at Performance Asc created_at
ix_notifications_is_read Performance Asc is_read
ix_notifications_user_created Performance Asc/Asc user_id + created_at
ix_notifications_user_id Performance Asc user_id

Check Constraints

Constraint Name Constraint
chk_notifications_type ((type)::text = ANY ((ARRAY['email'::character varying, 'draw_result'::character varying, 'invite'::character varying, 'message'::character varying, 'gift_sent'::character varying, 'gift_received'::character varying, 'vote'::character varying])::text[]))

Relationships