umc_week1

Tables (9)

category (Untitled5)

  • category_id (카테고리아이디) — bigint — Primary key — NOT NULL
  • category_name (카테고리이름) — enum('kakao', 'google', 'naver') — NOT NULL

mission (Untitled2)

  • mission_id (미션아이디) — bigint — Primary key — NOT NULL
  • store_id (가게아이디) — bigint — Foreign key → store.store_id — NOT NULL
  • mission_name (미션이름) — varchar(100) — NOT NULL
  • mission_description (미션설명) — varchar(255)
  • mission_type (미션 타입) — enum('visit','purchase','review') — NOT NULL
  • mission_point (미션 개별 포인트) — bigint — NOT NULL
  • is_active (활성화여부) — boolean — NOT NULL
  • created_at (생성일자) — datetime(6) — NOT NULL
  • updated_at (갱신일자) — datetime(6) — NOT NULL
  • deleted_at (삭제일자) — datetime(6)

review (Untitled7)

  • review_id (리뷰아이디) — bitint — Primary key — NOT NULL
  • user_id (유저아이디) — bigint — Foreign key → user.user_id — NOT NULL
  • store_id (가게아이디) — bigint — Foreign key → store.store_id — NOT NULL
  • rate (별점) — decimal(2,1) (0.0 ~ 5.0) — NOT NULL
  • content (리뷰내용) — varchar(100)
  • created_at (생성일자) — datetime(6) — NOT NULL
  • updated_at (갱신일자) — datetime(6) — NOT NULL
  • deleted_at (삭제일자) — datetime(6)

review_image (Untitled9)

  • review_image_id (리뷰이미지아이디) — bigint — Primary key — NOT NULL
  • review_id (리뷰아이디) — bitint — Foreign key → review.review_id — NOT NULL
  • image_url (리뷰이미지url) — text — NOT NULL
  • display_order (정렬 순서) — int — NOT NULL
  • created_at (생성일자) — datetime(6) — NOT NULL

store (Untitled3)

  • store_id (가게아이디) — bigint — Primary key — NOT NULL
  • category_id (카테고리아이디) — bigint — Foreign key → category.category_id — NOT NULL
  • store_name (가게이름) — varchar(50) — NOT NULL
  • address (가게주소) — varchar(255) — NOT NULL
  • description (가게설명) — varchar(255)
  • status (가게상태) — enum("open", "closed") — NOT NULL
  • created_at (생성일자) — datetime(6) — NOT NULL
  • updated_at (갱신일자) — datetime(6) — NOT NULL
  • deleted_at (삭제일자) — datetime(6)
  • boss_id (사장님아이디) — bigint — NOT NULL

store_image (Untitled8)

  • store_image_id (가게이미지아이디) — bigint — Primary key — NOT NULL
  • store_id (가게아이디) — bigint — Foreign key → store.store_id — NOT NULL
  • image_url (가게이미지url) — text — NOT NULL
  • display_order (정렬순서) — int — NOT NULL
  • created_at (생성일자) — datetime(6) — NOT NULL

user (Untitled)

  • user_id (유저아이디) — bigint — Primary key — NOT NULL
  • provider (소셜 로그인 제공자) — enum('kakao', 'google', 'naver') — NOT NULL
  • provider_id (소셜 로그인 식별값) — enum('kakao', 'google', 'naver') — NOT NULL
  • email (이메일) — varchar(40)
  • nickname (닉네임) — varchar(30)
  • birth (생일) — date
  • phone_num (전화번호) — varchar(20)
  • gender (성별) — enum("M", "F")
  • address (주소) — varchar(255)
  • created_at (생성일자) — datetime(6) — NOT NULL
  • updated_at (갱신일자) — datetime(6) — NOT NULL
  • deleted_at (삭제일자) — datetime(6)

user_category (Untitled6)

  • user_category_id (유저_카테고리 아이디) — bigint — Primary key — NOT NULL
  • user_id (유저아이디) — enum('kakao', 'google', 'naver') — Foreign key → user.user_id — NOT NULL
  • category_id (카테고리아이디) — enum('kakao', 'google', 'naver') — Foreign key → category.category_id — NOT NULL
  • created_at (생성일자) — datetime(6) — NOT NULL

user_mission (Untitled4)

  • user_mission_id (유저_미션아이디) — bigint — Primary key — NOT NULL
  • user_id (유저아이디) — enum('kakao', 'google', 'naver') — Foreign key → user.user_id — NOT NULL
  • mission_id (미션아이디) — enum('kakao', 'google', 'naver') — Foreign key → mission.mission_id — NOT NULL
  • status (진행상태) — enum('assigned', 'in_progress' , 'completed') — NOT NULL
  • assigned_at (미션 받은 시각) — datetime(6)
  • started_at (미션 시작 시각) — datetime(6)
  • completed_at (미션 완료 시각) — datetime(6)
  • created_at (생성일자) — datetime(6) — NOT NULL