Skip to content

public.payment

Description

Columns

Name Type Default Nullable Children Parents Comment
id uuid false (DC2Type:uuid)
status varchar(255) false
total_amount bigint false
total_currency character(3) false (DC2Type:currency)
stripe_client_secret varchar(255) NULL::character varying true
is_paid boolean false false
paid_at timestamp(0) with time zone NULL::timestamp with time zone true (DC2Type:datetimetz_immutable)
voucher_id uuid true public.voucher (DC2Type:uuid)
stripe_payment_intent_id varchar(255) NULL::character varying true
payment_source varchar(255) NULL::character varying true
expired_at timestamp(0) with time zone NULL::timestamp with time zone true (DC2Type:datetimetz_immutable)
voucher_redemption_id uuid true public.voucher_redemption (DC2Type:uuid)
cart_id uuid false public.cart (DC2Type:uuid)

Constraints

Name Type Definition
fk_6d28840d1ad5cdbf FOREIGN KEY FOREIGN KEY (cart_id) REFERENCES cart(id)
payment_pkey PRIMARY KEY PRIMARY KEY (id)
fk_6d28840d28aa1b6f FOREIGN KEY FOREIGN KEY (voucher_id) REFERENCES voucher(id)
fk_6d28840d5c6f8643 FOREIGN KEY FOREIGN KEY (voucher_redemption_id) REFERENCES voucher_redemption(id)

Indexes

Name Definition
payment_pkey CREATE UNIQUE INDEX payment_pkey ON public.payment USING btree (id)
idx_6d28840d28aa1b6f CREATE INDEX idx_6d28840d28aa1b6f ON public.payment USING btree (voucher_id)
uniq_6d28840dfc72f97e CREATE UNIQUE INDEX uniq_6d28840dfc72f97e ON public.payment USING btree (stripe_payment_intent_id)
uniq_6d28840d5c6f8643 CREATE UNIQUE INDEX uniq_6d28840d5c6f8643 ON public.payment USING btree (voucher_redemption_id)
uniq_6d28840d1ad5cdbf CREATE UNIQUE INDEX uniq_6d28840d1ad5cdbf ON public.payment USING btree (cart_id)

Relations

er


Generated by tbls