tugo-server

Tables (12)

BaseTimeEntity

  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

comments

  • comment_id — BIGSERIAL — Primary key — NOT NULL
  • content — TEXT — NOT NULL
  • post_id — BIGSERIAL — Foreign key → posts.post_id — NOT NULL
  • member_id — BIGSERIAL — Foreign key → members.member_id — NOT NULL

creators

  • creator_id — BIGINT — Primary key — NOT NULL
  • public_name — VARCHAR(100) — NOT NULL
  • profile_url — VARCHAR(50) — NOT NULL
  • bio — TEXT
  • banner_image_url — VARCHAR(255)
  • verification_status — verification_status — NOT NULL
  • member_id — BIGSERIAL — Foreign key → members.member_id — NOT NULL

likes

  • like_id — BIGINT — Primary key — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • post_id (post_id2) — BIGSERIAL — Foreign key → posts.post_id — NOT NULL
  • member_id — BIGSERIAL — Foreign key → members.member_id — NOT NULL

media

  • media_id — BIGSERIAL — Primary key — NOT NULL
  • uploader_id — BIGINT — NOT NULL
  • media_type — media_type — NOT NULL
  • file_url — VARCHAR(255) — NOT NULL
  • ppv_price — DECIMAL(8, 2)
  • post_id — BIGSERIAL — Foreign key → posts.post_id — NOT NULL

members

  • member_id — BIGSERIAL — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • role — user_role — NOT NULL
  • is_active — BOOLEAN — NOT NULL
  • password (String) — VARCHAR(255)

payment

  • payment_id — Long — Primary key — NOT NULL
  • paymentKey — VARCHAR — NOT NULL
  • orderId — VARCHAR
  • paymentStatus — VARCHAR — NOT NULL
  • paymentMethod — VARCHAR — NOT NULL
  • member_id (member_id2) — BIGSERIAL — Foreign key → members.member_id — NOT NULL

payouts

  • payout_id — BIGSERIAL — Primary key — NOT NULL
  • amount — DECIMAL(12, 2) — NOT NULL
  • status (PayoutStatus) — payout_status — NOT NULL
  • creator_id — BIGINT — Foreign key → creators.creator_id — NOT NULL

posts

  • post_id — BIGSERIAL — Primary key — NOT NULL
  • content_text — TEXT
  • post_type — post_type — NOT NULL
  • ppv_price — DECIMAL(8, 2)
  • creator_id — BIGINT — Foreign key → creators.creator_id — NOT NULL

subscription_tiers

  • tier_id — BIGSERIAL — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • price_monthly — DECIMAL(8, 2) — NOT NULL
  • description — TEXT
  • creator_id — BIGINT — Foreign key → creators.creator_id — NOT NULL

subscriptions

  • subscription_id — BIGSERIAL — Primary key — NOT NULL
  • subscriptionStatus (status) — subscription_status — NOT NULL
  • creator_id — BIGINT — Foreign key → creators.creator_id — NOT NULL
  • member_id — BIGSERIAL — Foreign key → members.member_id — NOT NULL
  • tier_id — BIGSERIAL — Foreign key → subscription_tiers.tier_id — NOT NULL

transactions

  • transaction_id — BIGSERIAL — Primary key — NOT NULL
  • transaction_type — transaction_type — NOT NULL
  • related_entity_id — BIGINT
  • transactionStatus (TransactionStatus) — transaction_status — NOT NULL
  • payment_gateway_ref — VARCHAR(255)
  • created_at — TIMESTAMPTZ — NOT NULL
  • member_id — BIGSERIAL — Foreign key → members.member_id — NOT NULL
  • member_id (member_id2) — BIGSERIAL — Foreign key → members.member_id — NOT NULL