Guda

Tables (7)

chat_rooms

  • id — UUID
  • user_id — UUID — Foreign key → profiles.id
  • topic_code — TEXT — NOT NULL
  • title — TEXT
  • is_archived — BOOLEAN
  • last_message_preview — TEXT
  • last_message_at — TIMESTAMPTZ
  • created_at — TIMESTAMPTZ

messages

  • id — BIGINT
  • chat_room_id — UUID — Foreign key → chat_rooms.id
  • sender_role — TEXT
  • content — TEXT — NOT NULL
  • created_at — TIMESTAMPTZ

products

  • id — UUID
  • name — TEXT — NOT NULL
  • type — TEXT — NOT NULL
  • price — INT4 — NOT NULL
  • usage_limit — INT4
  • description — TEXT
  • created_at — TIMESTAMPTZ

profiles

  • id — UUID
  • email — TEXT
  • nickname — TEXT
  • ui_settings — JSONB
  • terms_agreed_at — TIMESTAMPTZ
  • is_onboarding_completed — BOOLEAN
  • deleted_at — TIMESTAMPTZ
  • created_at — TIMESTAMPTZ
  • updated_at — TIMESTAMPTZ

system_config

  • id — INT4
  • min_version — TEXT
  • is_maintenance — BOOLEAN
  • notice_title — TEXT
  • updated_at — TIMESTAMPTZ

transactions

  • id — UUID
  • user_id — UUID — Foreign key → profiles.id
  • product_id — UUID — Foreign key → products.id
  • receipt_data — TEXT
  • status — TEXT
  • error_message — TEXT
  • amount — INT4 — NOT NULL
  • created_at — TIMESTAMPTZ

user_subscriptions

  • user_id — UUID — Foreign key → profiles.id
  • product_id — UUID — Foreign key → products.id
  • status — TEXT
  • remaining_count — INT4
  • next_billing_at — TIMESTAMPTZ
  • updated_at — TIMESTAMPTZ