petinside

Tables (15)

badge

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • started_at — DATETIME — NOT NULL
  • expired_at — DATETIME
  • is_badge_visible — BOOLEAN — NOT NULL

billing_key

  • id — BIGINT — Primary key — NOT NULL
  • subscription_id — BIGINT — Foreign key → subscription.id — NOT NULL
  • billing_key_encrypted — VARCHAR(255) — NOT NULL
  • is_active — BOOLEAN — NOT NULL
  • issued_at — DATETIME — NOT NULL
  • revoked_at — DATETIME

comment

  • id — BIGINT — Primary key — NOT NULL
  • post_id — BIGINT — Foreign key → post.id — NOT NULL
  • author_id — BIGINT — Foreign key → users.id — NOT NULL
  • parent_id — BIGINT — Foreign key → comment.id
  • content — TEXT — NOT NULL
  • is_deleted — BOOLEAN
  • created_at — DATETIME — NOT NULL

comment_emoji

  • id — BIGINT — Primary key — NOT NULL
  • comment_id — BIGINT — Foreign key → comment.id — NOT NULL
  • emoji_id — BIGINT — Foreign key → emoji.id — NOT NULL
  • sort_order — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

emoji

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • image_url — VARCHAR(255) — NOT NULL
  • is_active — BOOLEAN — NOT NULL

like

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • post_id — BIGINT — Foreign key → post.id — NOT NULL
  • created_at — DATETIME — NOT NULL
  • is_deleted — BOOLEAN — NOT NULL
  • deleted_at — DATETIME

notification

  • id — BIGINT — Primary key — NOT NULL
  • receiver_id — BIGINT — Foreign key → users.id — NOT NULL
  • type — VARCHAR(20) — NOT NULL
  • content — VARCHAR(255) — NOT NULL
  • target_id — BIGINT — NOT NULL
  • is_read — BOOLEAN — NOT NULL
  • link_url — VARCHAR(255)
  • created_at — DATETIME — NOT NULL

payment

  • id — BIGINT — Primary key — NOT NULL
  • subscription_id — BIGINT — Foreign key → subscription.id — NOT NULL
  • payment_id — VARCHAR(100) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • round — INT — NOT NULL
  • amount — INT — NOT NULL
  • currency — VARCHAR(10) — NOT NULL
  • paid_at — DATETIME
  • created_at — DATETIME — NOT NULL

post

  • id — BIGINT — Primary key — NOT NULL
  • author_id — BIGINT — Foreign key → users.id — NOT NULL
  • category — VARCHAR(50) — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • content — TEXT — NOT NULL
  • view_count — INT — NOT NULL
  • is_deleted — BOOLEAN
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

post_emoji

  • id — BIGINT — Primary key — NOT NULL
  • post_id — BIGINT — Foreign key → post.id — NOT NULL
  • emoji_id — BIGINT — Foreign key → emoji.id — NOT NULL
  • sort_order — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

post_image

  • id — BIGINT — Primary key — NOT NULL
  • post_id — BIGINT — Foreign key → post.id — NOT NULL
  • image_url — VARCHAR(255) — NOT NULL
  • sort_order — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

refresh_token

  • id — VARCHAR(255) — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • is_revoked — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL
  • expires_at — DATETIME — NOT NULL
  • token_value — VARCHAR(255)

social_account

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • provider — VARCHAR(20) — NOT NULL
  • provider_id — VARCHAR(100) — NOT NULL
  • connected_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

subscription

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • start_at — DATETIME — NOT NULL
  • end_date — DATETIME — NOT NULL
  • next_billing_at — DATETIME — NOT NULL
  • canceled_at — DATETIME
  • payment_failed_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • username — VARCHAR(50) — NOT NULL
  • password — VARCHAR(255)
  • nickname — VARCHAR(50) — NOT NULL
  • profile_image_url — VARCHAR(255)
  • role — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL