Instagram

Tables (9)

comment

  • comment_id — BIGINT
  • content — TEXT
  • feed_id — BIGINT — NOT NULL
  • writer_id — BIGINT — NOT NULL
  • path — VARCHAR(255)
  • status — ENUM('ACTIVE', 'DELETED_BY_USER', 'BLOCKED') — NOT NULL
  • created_at — TIMESTAMP(6) — NOT NULL
  • updated_at — TIMESTAMP(6) — NOT NULL
  • INDEX — idx_feed_status
  • INDEX — idx_writer_id
  • INDEX — idx_path
  • INDEX — idx_created_at

feed_images

  • image_id — BIGINT
  • feed_id — BIGINT — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • INDEX — idx_feed_id

feed_like

  • feed_like_id — BIGINT
  • feed_id — BIGINT — NOT NULL
  • user_id — BIGINT — NOT NULL
  • created_at — TIMESTAMP(6) — NOT NULL
  • updated_at — TIMESTAMP(6) — NOT NULL
  • INDEX — idx_user_likes
  • INDEX — idx_feed_likes

feeds

  • feed_id — BIGINT
  • writer_id — BIGINT — NOT NULL
  • content — TEXT
  • status — ENUM('ACTIVE', 'USER_DELETED', 'ADMIN_REMOVED') — NOT NULL
  • created_at — TIMESTAMP(6) — NOT NULL
  • updated_at — TIMESTAMP(6) — NOT NULL
  • INDEX — idx_writer_status
  • INDEX — idx_status
  • INDEX — idx_created_at

like_count

  • feed_id — BIGINT
  • like_count — BIGINT — NOT NULL
  • created_at — TIMESTAMP(6) — NOT NULL
  • updated_at — TIMESTAMP(6) — NOT NULL

reports

  • report_id — BIGINT
  • reporter_id — BIGINT — NOT NULL
  • feed_id — BIGINT
  • comment_id — BIGINT
  • reason — VARCHAR(500) — NOT NULL
  • status — ENUM('PENDING', 'BLOCK_COMPLETED', 'REJECTED') — NOT NULL
  • created_at — TIMESTAMP(6) — NOT NULL
  • updated_at — TIMESTAMP(6) — NOT NULL
  • INDEX — idx_reporter_status
  • INDEX — idx_feed_reports
  • INDEX — idx_comment_reports
  • INDEX — idx_status

subscriptions

  • subscription_id — BIGINT
  • follower_id — BIGINT — NOT NULL
  • followee_id — BIGINT — NOT NULL
  • start_at — TIMESTAMP(6) — NOT NULL
  • end_at — TIMESTAMP(6)
  • follow_status — ENUM('FOLLOWING', 'UNFOLLOWED', 'BLOCKED_BY_FOLLOWEE') — NOT NULL
  • created_at — TIMESTAMP(6) — NOT NULL
  • updated_at — TIMESTAMP(6) — NOT NULL
  • INDEX — idx_follower_status
  • INDEX — idx_followee_status
  • INDEX — idx_follow_status

user_agreements

  • agreement_id — BIGINT
  • user_id — BIGINT — NOT NULL
  • agreement_type — ENUM('DATA_POLICY', 'LOCATION_BASED_SERVICE', 'TERMS_OF_SERVICE') — NOT NULL
  • is_agreed — BOOLEAN — NOT NULL
  • agreed_at — TIMESTAMP(6)
  • created_at — TIMESTAMP(6) — NOT NULL
  • updated_at — TIMESTAMP(6) — NOT NULL
  • INDEX — idx_user_agreement
  • INDEX — idx_agreed_status

users

  • user_id — BIGINT
  • username — VARCHAR(50) — NOT NULL
  • password — VARCHAR(255)
  • name — VARCHAR(100)
  • phone_number — VARCHAR(255)
  • birth_day — DATE
  • provider — ENUM('GOOGLE', 'KAKAO', 'NAVER')
  • oauth_id — VARCHAR(255)
  • role — ENUM('ADMIN', 'USER')
  • status — ENUM('ACTIVE', 'INACTIVE', 'SUSPENDED') — NOT NULL
  • last_login_at — TIMESTAMP(6)
  • created_at — TIMESTAMP(6) — NOT NULL
  • updated_at — TIMESTAMP(6) — NOT NULL
  • INDEX — idx_username
  • INDEX — idx_oauth_provider_id
  • INDEX — idx_status