Sttangbucks

Tables (7)

GiftStocks (매장 별 증정품 재고)

  • id (재고 ID) — PK — Primary key — NOT NULL
  • store_id (매장 ID) — FK — Foreign key → Stores.id — NOT NULL
  • gift_id (증정품 ID) — FK — Foreign key → Gifts.id — NOT NULL
  • quantity (현재 재고 수량) — NOT NULL
  • crated_at (재고 등록 일시) — NOT NULL
  • updated_at (최근 업데이트 일시) — NOT NULL

Gifts (증정품)

  • id (증정품 ID) — PK — Primary key — NOT NULL
  • name (증정품 이름) — NOT NULL
  • category (증정품 카테고리) — NOT NULL
  • image_url (증정품 이미지 URL) — NOT NULL
  • created_at (증정품 등록 일시) — NOT NULL

Guguns (구/군)

  • id (구/군 ID) — PK — Primary key — NOT NULL
  • name (구/군 이름) — NOT NULL
  • sido_id (시/도 ID) — FK — Foreign key → Sidos.id — NOT NULL

Reservations (증정품 예약)

  • id (예약 ID) — PK — Primary key — NOT NULL
  • user_id (회원 고유 ID) — FK — Foreign key → Users.id — NOT NULL
  • store_id (매장 ID) — FK — Foreign key → Stores.id — NOT NULL
  • gift_id (증정품 ID) — FK — Foreign key → Gifts.id — NOT NULL
  • date (예약 수령 일자) — NOT NULL
  • status (예약 상태) — NOT NULL
  • created_at (예약 일시) — NOT NULL
  • updated_at (상태 변경 일시) — NOT NULL

Sidos (시/도)

  • id (시/도 ID) — PK — Primary key — NOT NULL
  • name (시/도 이름) — NOT NULL

Stores (매장)

  • id (매장 ID) — PK — Primary key — NOT NULL
  • name (매장 이름) — NOT NULL
  • sido_id (시/도 ID) — FK — Foreign key → Sidos.id — NOT NULL
  • gugun_id (구/군 ID) — FK — Foreign key → Guguns.id
  • address (매장 주소) — NOT NULL
  • tel (매장 전화번호) — NOT NULL
  • latitude (위도) — NOT NULL
  • longitude (경도) — NOT NULL

Users (회원)

  • id (회원 고유 ID) — PK — Primary key — NOT NULL
  • username (아이디) — UK — NOT NULL
  • password (비밀번호) — NOT NULL
  • email (이메일) — UK — NOT NULL
  • phone (휴대전화번호) — NOT NULL
  • nickname (닉네임)
  • birth (생년월일)
  • sex (성별)
  • created_at (계정 생성 시점) — NOT NULL
  • updated_at (계정 정보 최종 수정 시점) — NOT NULL
  • is_active (계정 활성화 여부) — NOT NULL