UMC 1회차 실습
테이블 (13)
food_category
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 음식 종류 (food-type) — enum('한식', '일식', '중식', '양식', '치킨', '분식', '고기구이', '도시락', '야식', '패스트푸드', '디저트', '아시안푸드')
- 생성 일자 (created_at) — datetime(6)
- 수정 일자 (updated_at) — datetime(6)
inquiries
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 사용자 (user-id) — bigint — 외래 키 → user.기본키 — NOT NULL
- 문의 제목 (title) — varchar(255)
- 문의 유형 (type) — varchar(255)
- 문의 내용 (content) — text
- 첨부 이미지 (attatched-img) — text
- 답변 여부 (is-answered) — boolean
- 생성 일자 (created-at) — datetime(6)
mission
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 가게 (store_id) — bigint — 외래 키 → store.기본키 — NOT NULL
- 보상 포인트 (reward) — int
- 미션 내용 (mission_content) — text
- 미션인증번호 (verification_code) — varchar(255)
- 종료 일자 (deadline) — datetime(6)
- 생성 일자 (created_at) — datetime(6)
- 수정 일자 (updated_at) — datetime(6)
notification
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 알림 종류 (type) — enum ('미션도착알림', '리뷰요청알림')
- 알림 내용 (content) — text
- 받은 일자 (received_at) — datetime(6)
- 확인 일자 (read_at) — datetime(6)
- 사용자 (user-id) — bigint — 외래 키 → user.기본키 — NOT NULL
owner_comment
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 리뷰 (review-id) — bigint — 외래 키 → review.기본키 — NOT NULL
- 댓글 내용 (content) — text
- 생성 일자 (created-at) — datetime(6)
region
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 지역명 (name) — varchar(20)
- 생성 일자 (created_at) — datetime(6)
- 수정 일자 (updated_at) — datetime(6)
review
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 가게 (store_id) — bigint — 외래 키 → store.기본키 — NOT NULL
- 사용자 (user_id) — bigint — 외래 키 → user.기본키 — NOT NULL
- 별점 (score) — float
- 리뷰 내용 (review_content) — text
- 첨부 이미지 (attached_img) — text
- 생성 일자 (created_at) — datetime(6)
- 수정 일자 (updated_at) — datetime(6)
store
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 지역 (region_id) — bigint — 외래 키 → region.기본키 — NOT NULL
- 이름 (name) — varchar(255)
- 종류 (category) — varchar(255)
- 위치 (address) — varchar(255)
- 별점 (score) — float
- 생성 일자 (created_at) — datetime(6)
- 수정 일자 (updated_at) — datetime(6)
terms
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 제목 (title) — varchar(20)
- 내용 (terms_content) — text
- 생성 일자 (created_at) — datetime(6)
- 수정 일자 (updated_at) — datetime(6)
- 선택 여부 (optional) — boolean
user
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 이름 (name) — varchar(100)
- 성별 (gender) — enum('M', 'F', 'N')
- 생년월일 (birthdate) — date
- 주소 (address) — varchar(255)
- 상세 주소 (detail_address) — varchar(255)
- 상태 (status) — varchar(10)
- 삭제 일자 (inactive_date) — datetime(6)
- 이메일 (email) — varchar(255)
- 전화번호 (phone-num) — varchar(15)
- 별명 (nickname) — varchar(100)
- 총 포인트 (total-points) — int unsigned
- 휴대폰 인증 (phone-verified) — boolean
- 새로운이벤트알림수신 희망 여부 (new-event-alert) — boolean
- 리뷰답변알림 수신 희망 여부 (review-reply-alert) — boolean
- 문의내역답변알림 수신 희망 여부 (inquiry-reply-alert) — boolean
- 소셜로그인 종류 (social_login_type) — enum('kakao', 'naver', 'google')
user-food-preference
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 사용자 (user-id) — bigint — 외래 키 → user.기본키 — NOT NULL
- 음식 종류 (food_category_id) — bigint — 외래 키 → food_category.기본키 — NOT NULL
- 생성 일자 (created_at) — datetime(6)
- 수정 일자 (updated_at) — datetime(6)
user_agree
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 약관 (terms_id) — bigint — 외래 키 → terms.기본키 — NOT NULL
- 사용자 (user_id) — bigint — 외래 키 → user.기본키 — NOT NULL
- 생성 일자 (created_at) — datetime(6)
- 수정 일자 (updated_at) — datetime(6)
user_mission
- 기본키 (id) — bigint — 기본 키 — NOT NULL
- 미션 (mission_id) — bigint — 외래 키 → mission.기본키 — NOT NULL
- 사용자 (user-id) — bigint — 외래 키 → user.기본키 — NOT NULL
- 상태 (status) — varchar(15)
- 생성 일자 (created_at) — datetime(6)
- 수정 일자 (updated_at) — datetime(6)