Appearance
public.notification_recipient
Description
Entidade que representa o vínculo entre as notificações e os destinatários (ex: usuário ou setor)
Columns
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| id | uuid | false | Chave primária do registro do destinatário | |||
| notification_id | uuid | false | public.notification | Chave estrangeira para a notificação | ||
| recipient_id | uuid | false | UUID do destinatário (pode ser um usuário ou um setor) | |||
| recipient_type | varchar(50) | false | Tipo do destinatário (USER ou SECTOR) |
Constraints
| Name | Type | Definition |
|---|---|---|
| fk_notification_recipient_on_notification | FOREIGN KEY | FOREIGN KEY (notification_id) REFERENCES notification(id) |
| pk_notification_recipient | PRIMARY KEY | PRIMARY KEY (id) |
Indexes
| Name | Definition |
|---|---|
| pk_notification_recipient | CREATE UNIQUE INDEX pk_notification_recipient ON public.notification_recipient USING btree (id) |
| idx_recipient_id | CREATE INDEX idx_recipient_id ON public.notification_recipient USING btree (recipient_id) |
Relations
Generated by tbls