practice2

Tables (16)

Service (시술)

  • service_id (시술 id) — BIGINT — Primary key — NOT NULL
  • name (시술명) — VARCHAR(200)
  • charge (시술가격)
  • description (시술설명)
  • taken_time (소요시간)
  • shop_id (가게 id) — BIGINT — Foreign key → Shop.shop_id — NOT NULL

Shop (매장)

  • shop_id (가게 id) — BIGINT — Primary key — NOT NULL
  • name (매장 이름)
  • number (연락처)
  • detail_location (가게 상세주소)
  • description (가게 소개)
  • treatment (업종)
  • closed_day (휴무일)
  • break_time (휴게시간)
  • business_hour (영업시간)
  • location_id (지역 id) — BIGINT — Foreign key → location.location_id — NOT NULL

auth_account (OAuth 인증용)

  • auth_id (id) — BIGINT — Primary key — NOT NULL
  • social_id (내부식별용 id) — VARCHAR(200)
  • social_pw (auth pw)
  • user_id (아이디) — BIGINT — Foreign key → user.user_id — NOT NULL

business_certification (사업자등록증)

  • id (아이디) — BIGINT — Primary key — NOT NULL
  • number (사업자등록번호)
  • is_able (유효사업자 확인)
  • shop_id (가게 id) — BIGINT — Foreign key → Shop.shop_id — NOT NULL

coupon (쿠폰)

  • coupon_id (id) — BIGINT — Primary key — NOT NULL
  • name (쿠폰명) — VARCHAR(200)
  • discount (할인율)
  • user_id (아이디) — BIGINT — Foreign key → user.user_id — NOT NULL

customer (직원)

  • id (직원 id) — BIGINT — Primary key — NOT NULL
  • role (직원 계급) — VARCHAR(200)
  • user_id (아이디) — BIGINT — Foreign key → user.user_id — NOT NULL
  • shop_id (가게 id) — BIGINT — Foreign key → Shop.shop_id — NOT NULL

customer (손님)

  • customer_id (손님 id) — BIGINT — Primary key — NOT NULL
  • location (현재 지역) — VARCHAR(200)
  • user_id (아이디) — BIGINT — Foreign key → user.user_id — NOT NULL

customer_service (직원-시술)

  • id (아이디) — BIGINT — Primary key — NOT NULL
  • time (시술가능시간)
  • id (직원 id) — BIGINT — Foreign key → customer.id — NOT NULL
  • service_id (시술 id) — BIGINT — Foreign key → Service.service_id — NOT NULL

location (지역)

  • location_id (지역 id) — BIGINT — Primary key — NOT NULL
  • location (지역명) — VARCHAR(200)

notice (공지사항)

  • notice)id (id) — BIGINT — Primary key — NOT NULL
  • title (제목)
  • body (내용)
  • shop_id (가게 id) — BIGINT — Foreign key → Shop.shop_id — NOT NULL

payment (결제정보)

  • payment_id (결제정보 id) — Primary key — NOT NULL
  • title (결제내용)
  • charge (요금)
  • method (결제방법)
  • reservation_id (아이디) — BIGINT — Foreign key → reservation.reservation_id — NOT NULL

reservation (예약)

  • reservation_id (아이디) — BIGINT — Primary key — NOT NULL
  • service (서비스내용) — VARCHAR(200)
  • date (시술날짜) — DATETIME(2)
  • time (시술시간) — DATETIME(6)
  • Field
  • shop_id (가게 id) — BIGINT — Foreign key → Shop.shop_id — NOT NULL
  • customer_id (손님 id) — BIGINT — Foreign key → customer.customer_id — NOT NULL

reservation_list (예약내역)

  • reservation_list_id (예약내역 id) — BIGINT — Primary key — NOT NULL
  • name (예약명)
  • customer_id (손님 id) — BIGINT — Foreign key → customer.customer_id — NOT NULL
  • reservation_id (아이디) — BIGINT — Foreign key → reservation.reservation_id — NOT NULL

review (리뷰)

  • review_id (아이디) — BIGINT — Primary key — NOT NULL
  • title (제목)
  • body (내용)
  • rate (별점)
  • shop_id (가게 id) — BIGINT — Foreign key → Shop.shop_id — NOT NULL
  • customer_id (손님 id) — BIGINT — Foreign key → customer.customer_id — NOT NULL

shop_coupon (가게발행쿠폰)

  • coupon_id (id) — BIGINT — Primary key — NOT NULL
  • name (쿠폰명) — VARCHAR(200)
  • discount (할인율)
  • shop_id (가게 id) — BIGINT — Foreign key → Shop.shop_id — NOT NULL

user (사용자)

  • user_id (아이디) — BIGINT — Primary key — NOT NULL
  • login_type (소셜/로컬 로그인 타입) — ENUM
  • login_id (자체 로그인 id) — VARCHAR(30)
  • login_pw (자체 로그인 pw) — VARCHAR(200)
  • nickname (닉네임) — VARCHAR(200)
  • phone_number (휴대폰 번호) — VARCHAR(30)
  • state_message (상태메세지) — VARCHAR(1500)
  • profile_image (프로필 이미지) — VARCHAR(200)