School

Tables (5)

category

  • category_id — BIGINT — Primary key — NOT NULL
  • name — varchar(50)

events

  • event_id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
  • title — varchar(50)
  • description — TEXT
  • start_date — DATE
  • end_date — DATE
  • active — boolean — 현재 이벤트 진행 여부

store_category

  • store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
  • category_id — BIGINT — Foreign key → category.category_id — NOT NULL

stores

  • store_id — BIGINT — Primary key — NOT NULL
  • name — varchar(50)
  • latitude — DECIMAL(10,7) — 위도
  • longitude — DECIMAL(10, 7) — 경도
  • created_at — DATETIME
  • updated_at — DATETIME

users

  • user_id — BIGINT — Primary key — NOT NULL
  • name — varchar(50)
  • email — varchar(50)
  • password — varchar(100)
  • role — varchar(20)
  • created_at — DATETIME