public.voucher
[BASE TABLE]
id
[uuid]
code
[varchar(255)]
owner_id
[uuid]
amount_amount
[bigint]
amount_currency
[character(3)]
title
[varchar(255)]
type
[varchar(255)]
percentage
[integer]
created_by_id
[uuid]
expires_at
[timestamp(0) with time zone]
created_at
[timestamp(0) with time zone]
blocked_by_id
[uuid]
blocked_at
[timestamp(0) with time zone]
allowed_redemptions
[integer]
note
[text]
status
[varchar(255)]
kind
[varchar(255)]
max_redemptions_per_user
[integer]
original_kind
[varchar(255)]
public.user
[BASE TABLE]
id
[uuid]
first_name
[varchar(255)]
last_name
[varchar(255)]
email
[varchar(255)]
gender
[varchar(255)]
birthday
[date]
skill_level
[varchar(255)]
is_age_public
[boolean]
profile_image_path
[varchar(255)]
is_marketing_consent_granted
[boolean]
marketing_consent_granted_at
[timestamp(0) with time zone]
get_stream_token
[text]
email_address_id
[uuid]
preferred_playing_times
[text]
dominant_hands
[text]
locale
[varchar(255)]
is_deleted
[boolean]
deleted_at
[timestamp(0) with time zone]
created_at
[timestamp(0) with time zone]
phone_number
[varchar(255)]
FOREIGN KEY (owner_id) REFERENCES "user"(id)
FOREIGN KEY (created_by_id) REFERENCES "user"(id)
FOREIGN KEY (blocked_by_id) REFERENCES "user"(id)
public.payment
[BASE TABLE]
id
[uuid]
status
[varchar(255)]
total_amount
[bigint]
total_currency
[character(3)]
stripe_client_secret
[varchar(255)]
is_paid
[boolean]
paid_at
[timestamp(0) with time zone]
voucher_id
[uuid]
stripe_payment_intent_id
[varchar(255)]
payment_source
[varchar(255)]
expired_at
[timestamp(0) with time zone]
voucher_redemption_id
[uuid]
cart_id
[uuid]
FOREIGN KEY (voucher_id) REFERENCES voucher(id)
public.voucher_redemption
[BASE TABLE]
id
[uuid]
redeemed_by_id
[uuid]
voucher_id
[uuid]
redeemed_at
[timestamp(0) with time zone]
redeemed_amount_amount
[bigint]
redeemed_amount_currency
[character(3)]
FOREIGN KEY (voucher_id) REFERENCES voucher(id)
public.refund
[BASE TABLE]
id
[uuid]
player_id
[uuid]
status
[varchar(255)]
refunded_at
[timestamp(0) with time zone]
stripe_refund_id
[varchar(255)]
total_amount
[bigint]
total_currency
[character(3)]
created_at
[timestamp(0) with time zone]
voucher_id
[uuid]
refunded_amount_voucher_amount
[bigint]
refunded_amount_voucher_currency
[character(3)]
refunded_amount_online_amount
[bigint]
refunded_amount_online_currency
[character(3)]
strategy
[varchar(255)]
event_registration_id
[uuid]
FOREIGN KEY (voucher_id) REFERENCES voucher(id)
public.voucher_reservation
[BASE TABLE]
id
[uuid]
owner_id
[uuid]
stripe_payment_intent_id
[varchar(255)]
created_at
[timestamp(0) with time zone]
voucher_id
[uuid]
is_paid
[boolean]
amount_amount
[bigint]
amount_currency
[character(3)]
FOREIGN KEY (voucher_id) REFERENCES voucher(id)