12

Tables (27)

cart

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL

cart_item

  • id — BIGINT — Primary key — NOT NULL
  • cart_id — BIGINT — Foreign key → cart.id — NOT NULL
  • product_id — BIGINT — Foreign key → product.id — NOT NULL
  • quantity — INT — NOT NULL

chat_message

  • id — BIGINT — Primary key — NOT NULL
  • chat_room_id — BIGINT — Foreign key → chat_room.id — NOT NULL
  • sender_id — BIGINT — Foreign key → member.id — NOT NULL
  • message — TEXT — NOT NULL
  • type — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

chat_room

  • id — BIGINT — Primary key — NOT NULL
  • used_post_id — BIGINT — Foreign key → used_post.id — NOT NULL
  • seller_id — BIGINT — Foreign key → member.id — NOT NULL
  • buyer_id — BIGINT — Foreign key → member.id — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

comment

  • id — BIGINT — Primary key — NOT NULL
  • community_post_id — BIGINT — Foreign key → community_post.id — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • parent_id — BIGINT — Foreign key → comment.id
  • content — TEXT — NOT NULL
  • is_reported — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL

community_post

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • content — TEXT — NOT NULL
  • category — VARCHAR(50) — NOT NULL
  • img_url — VARCHAR(255)
  • view_count — INT — NOT NULL
  • like_count — INT — NOT NULL
  • is_reported — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

diagnosis_history

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • pet_id — BIGINT — Foreign key → pet_profile.id — NOT NULL
  • symptom_text — TEXT
  • image_url — VARCHAR(255)
  • result_disease — TEXT — NOT NULL
  • result_severity — VARCHAR(20) — NOT NULL
  • result_recommend — TEXT — NOT NULL
  • created_at — DATETIME — NOT NULL

hospital

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • address — VARCHAR(255) — NOT NULL
  • latitude — DECIMAL(10,7) — NOT NULL
  • longitude — DECIMAL(10,7) — NOT NULL
  • phone — VARCHAR(20) — NOT NULL
  • opening_hours — VARCHAR(255) — NOT NULL
  • is_emergency — TINYINT(1) — NOT NULL
  • department — VARCHAR(255)
  • rating — DECIMAL(3,1)
  • created_at — DATETIME — NOT NULL

hospital_review

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • hospital_id — BIGINT — Foreign key → hospital.id — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservation.id — NOT NULL
  • rating — INT — NOT NULL
  • content — TEXT — NOT NULL
  • is_reported — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL

lost_animal

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • pet_name — VARCHAR(50) — NOT NULL
  • species — VARCHAR(50) — NOT NULL
  • feature — TEXT — NOT NULL
  • lost_date — DATE — NOT NULL
  • lost_location — VARCHAR(255) — NOT NULL
  • latitude — DECIMAL(10,7) — NOT NULL
  • longitude — DECIMAL(10,7) — NOT NULL
  • img_url — VARCHAR(255)
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

manner_score

  • id — BIGINT — Primary key — NOT NULL
  • from_member_id — BIGINT — Foreign key → member.id — NOT NULL
  • to_member_id — BIGINT — Foreign key → member.id — NOT NULL
  • used_post_id — BIGINT — Foreign key → used_post.id — NOT NULL
  • score — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

medical_record

  • id — BIGINT — Primary key — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservation.id — NOT NULL
  • pet_id — BIGINT — Foreign key → pet_profile.id — NOT NULL
  • diagnosis — TEXT — NOT NULL
  • prescription — TEXT
  • pdf_url — VARCHAR(255)
  • visit_date — DATE — NOT NULL
  • created_at — DATETIME — NOT NULL

member

  • id — BIGINT — Primary key — NOT NULL
  • username — VARCHAR(50) — NOT NULL
  • password — VARCHAR(100) — NOT NULL
  • name — VARCHAR(30) — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • social_type — VARCHAR(20)
  • social_id — VARCHAR(100)
  • role — VARCHAR(20) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

order_item

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • product_id — BIGINT — Foreign key → product.id — NOT NULL
  • quantity — INT — NOT NULL
  • price — INT — NOT NULL

orders

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • order_name — VARCHAR(200) — NOT NULL
  • total_price — INT — NOT NULL
  • delivery_address — VARCHAR(255) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • payment_method — VARCHAR(30) — NOT NULL
  • payment_key — VARCHAR(200)
  • created_at — DATETIME — NOT NULL

pet_profile

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • species — VARCHAR(50) — NOT NULL
  • age — INT — NOT NULL
  • weight — DECIMAL(5,2)
  • gender — VARCHAR(10) — NOT NULL
  • allergy — TEXT
  • profile_img — VARCHAR(255)
  • created_at — DATETIME — NOT NULL

post_like

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • community_post_id — BIGINT — Foreign key → community_post.id — NOT NULL
  • created_at — DATETIME — NOT NULL

product

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • price — INT — NOT NULL
  • stock — INT — NOT NULL
  • category — VARCHAR(50) — NOT NULL
  • description — TEXT
  • img_url — VARCHAR(255) — NOT NULL
  • pet_species — VARCHAR(50)
  • is_active — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL

product_qna

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • product_id — BIGINT — Foreign key → product.id — NOT NULL
  • question — TEXT — NOT NULL
  • answer — TEXT
  • created_at — DATETIME — NOT NULL

product_review

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • product_id — BIGINT — Foreign key → product.id — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • rating — INT — NOT NULL
  • content — TEXT
  • img_url — VARCHAR(255)
  • created_at — DATETIME — NOT NULL

report

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • target_type — VARCHAR(30) — NOT NULL
  • target_id — BIGINT — NOT NULL
  • reason — TEXT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

reservation

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • hospital_id — BIGINT — Foreign key → hospital.id — NOT NULL
  • pet_id — BIGINT — Foreign key → pet_profile.id — NOT NULL
  • reserve_date — DATE — NOT NULL
  • reserve_time — TIME — NOT NULL
  • department — VARCHAR(50) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • wait_number — INT
  • created_at — DATETIME — NOT NULL

subscription

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • product_id — BIGINT — Foreign key → product.id — NOT NULL
  • quantity — INT — NOT NULL
  • cycle_days — INT — NOT NULL
  • next_delivery_date — DATE — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

used_post

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • content — TEXT — NOT NULL
  • price — INT — NOT NULL
  • category — VARCHAR(50) — NOT NULL
  • region — VARCHAR(100) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • is_hidden — TINYINT(1) — NOT NULL
  • report_count — INT — NOT NULL
  • pulled_up_at — DATETIME
  • created_at — DATETIME — NOT NULL

used_post_img

  • id — BIGINT — Primary key — NOT NULL
  • used_post_id — BIGINT — Foreign key → used_post.id — NOT NULL
  • img_url — VARCHAR(255) — NOT NULL
  • sort_order — INT — NOT NULL

vaccination

  • id — BIGINT — Primary key — NOT NULL
  • pet_id — BIGINT — Foreign key → pet_profile.id — NOT NULL
  • vaccine_name — VARCHAR(100) — NOT NULL
  • vaccinated_date — DATE — NOT NULL
  • next_date — DATE — NOT NULL
  • created_at — DATETIME — NOT NULL

wishlist

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • used_post_id — BIGINT — Foreign key → used_post.id — NOT NULL
  • created_at — DATETIME — NOT NULL