deliveries

-1 rows


Description

Доставки подарков

Columns

Column Type Size Nulls Auto Default Children Parents Comments
box_id uuid 2147483647 null
boxes.id deliveries_box_id_fkey C

Обмен (FK на boxes)

giver_participant_id uuid 2147483647 null
box_participants.id deliveries_giver_participant_id_fkey C

Даритель (FK на box_participants)

receiver_participant_id uuid 2147483647 null
box_participants.id deliveries_receiver_participant_id_fkey C

Получатель (FK на box_participants)

status text 2147483647 null

Статус доставки (FK на delivery_statuses)

transport_company text 2147483647 null

Транспортная компания (FK на transport_companies)

tracking_number text 2147483647 null

Трекинг-номер

pvz_address text 2147483647 null

Адрес ПВЗ

qr_code_data text 2147483647 null

Данные QR-кода

gift_photo_url text 2147483647 null

URL фото подарка в MinIO

gift_description text 2147483647 null

Описание подарка

shipped_at timestamptz 35,6 null

Дата отправки

delivered_at timestamptz 35,6 null

Дата получения

id uuid 2147483647 null
votes.delivery_id votes_delivery_id_fkey C

Уникальный идентификатор доставки (UUID)

created_at timestamptz 35,6 now()

Дата создания записи

updated_at timestamptz 35,6 now()

Дата последнего обновления

Indexes

Constraint Name Type Sort Column(s)
deliveries_pkey Primary key Asc id
ix_deliveries_box_id Performance Asc box_id
ix_deliveries_giver_participant_id Performance Asc giver_participant_id
ix_deliveries_receiver_participant_id Performance Asc receiver_participant_id
ix_deliveries_status Performance Asc status
ix_deliveries_transport_company Performance Asc transport_company

Check Constraints

Constraint Name Constraint
chk_deliveries_tracking_format ((tracking_number IS NULL) OR ((char_length(tracking_number) >= 5) AND (char_length(tracking_number) <= 100)))
chk_deliveries_dates ((shipped_at IS NULL) OR (delivered_at IS NULL) OR (delivered_at >= shipped_at))
chk_deliveries_different_participants (giver_participant_id <> receiver_participant_id)

Relationships