petinside
Tables (22)
billing_key
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- billing_key_encrypted — VARCHAR(500) — NOT NULL
- is_active — BOOLEAN — NOT NULL
- issued_at — DATETIME — NOT NULL
- revoked_at — DATETIME
billing_key_issuance_intent
- id — BIGINT — Primary key — NOT NULL
- issue_id — VARCHAR(255) — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- completed_at — DATETIME
- created_at — DATETIME — NOT NULL
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 — NOT NULL
- 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
comment_like
- id — BIGINT — Primary key — NOT NULL
- comment_id — BIGINT — Foreign key → comment.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — 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
notification
- id — BIGINT — Primary key — NOT NULL
- user_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
orders
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- amount — INT — NOT NULL
- currency — VARCHAR(10) — NOT NULL
- created_at — DATETIME — NOT NULL
payment
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- order_id — BIGINT — Foreign key → orders.id — NOT NULL
- subscription_id — BIGINT — Foreign key → subscription.id
- payment_id — VARCHAR(255) — 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
payment_transaction
- id — BIGINT — Primary key — NOT NULL
- payment_id — BIGINT — Foreign key → payment.id — NOT NULL
- transaction_id — VARCHAR(255)
- status — VARCHAR(20) — NOT NULL
- recorded_at — DATETIME — NOT NULL
pet
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- pet_name — VARCHAR(255) — NOT NULL
- pet_type — VARCHAR(255) — NOT NULL
- pet_birthday — DATE
- pet_intro — TEXT
- pet_image_url — VARCHAR(255)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
pet_photo
- id — BIGINT — Primary key — NOT NULL
- pet_id — BIGINT — Foreign key → pet.id — NOT NULL
- image_url — VARCHAR(255) — NOT NULL
- caption — VARCHAR(200)
- created_at — DATETIME — NOT NULL
pet_photo_like
- id — BIGINT — Primary key — NOT NULL
- photo_id — BIGINT — Foreign key → pet_photo.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — 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
- is_deleted — BOOLEAN — NOT NULL
- 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
post_like
- id — BIGINT — Primary key — NOT NULL
- post_id — BIGINT — Foreign key → post.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- created_at — DATETIME — NOT NULL
push_subscription
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- endpoint — VARCHAR(500) — NOT NULL
- p256dh — VARCHAR(255)
- auth — VARCHAR(255)
refresh_token
- id — BIGINT — 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) — NOT NULL
social_account
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- provider — VARCHAR(50) — NOT NULL
- provider_id — VARCHAR(255) — 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
- billing_key_id — BIGINT — Foreign key → billing_key.id
- status — VARCHAR(20) — NOT NULL
- start_at — 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
- active_user_id — BIGINT
users
- id — BIGINT — Primary key — NOT NULL
- username — VARCHAR(255) — NOT NULL
- password — VARCHAR(255)
- nickname — VARCHAR(255) — NOT NULL
- profile_image_url — VARCHAR(255)
- role — VARCHAR(50) — NOT NULL
- is_deleted — BOOLEAN — NOT NULL
- profile_layout — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL