Skip to content

public.voucher_redemption

Description

Columns

Name Type Default Nullable Children Parents Comment
id uuid false public.payment Unique identifier for the voucher redemption record(DC2Type:uuid)
redeemed_by_id uuid true public.user Reference to the user who redeemed the voucher(DC2Type:uuid)
voucher_id uuid false public.voucher Reference to the voucher that was redeemed(DC2Type:uuid)
redeemed_at timestamp(0) with time zone false Timestamp when the voucher was redeemed(DC2Type:datetimetz_immutable)
redeemed_amount_amount bigint false
redeemed_amount_currency character(3) false (DC2Type:currency)

Constraints

Name Type Definition
fk_a39050402fbc08ba FOREIGN KEY FOREIGN KEY (redeemed_by_id) REFERENCES "user"(id)
fk_a390504028aa1b6f FOREIGN KEY FOREIGN KEY (voucher_id) REFERENCES voucher(id)
voucher_redemption_pkey PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
voucher_redemption_pkey CREATE UNIQUE INDEX voucher_redemption_pkey ON public.voucher_redemption USING btree (id)
idx_a390504028aa1b6f CREATE INDEX idx_a390504028aa1b6f ON public.voucher_redemption USING btree (voucher_id)
idx_a39050402fbc08ba CREATE INDEX idx_a39050402fbc08ba ON public.voucher_redemption USING btree (redeemed_by_id)

Relations

er


Generated by tbls