UMC_Chap1_Mission
Tables (13)
Food_Type (식당(음식) 유형)
- id (식당 유형 아이디) — bigint — Primary key — NOT NULL
- name (유형 이름) — varchar(10)
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
Image (이미지)
- id (이미지 아이디) — bigint — Primary key — NOT NULL
- review_id (리뷰 아이디) — bigint — Foreign key → Review.id — NOT NULL
- image_path (이미지 url) — varchar(200)
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
Inquiry (문의)
- id (문의 아이디) — bigint — Primary key — NOT NULL
- user_id (유저 아이디) — bigint — Foreign key → User.id — NOT NULL
- type_id (문의 유형 아이디) — bigint — Foreign key → Inquiry_Type.id — NOT NULL
- title (문의 제목) — varchar(20)
- content (문의 내용) — varchar(100)
- is_answered (상태) — boolean
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
Inquiry_Type (문의 유형)
- id (문의 유형 아이디) — bigint — Primary key — NOT NULL
- info (문의 유형 설명) — varchar
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
Mission (미션)
- id (미션 아이디) — bigint — Primary key — NOT NULL
- restaurant_id (식당 아이디) — bigint — Foreign key → Restaurant.id — NOT NULL
- reward_percent (적립 퍼센트) — int
- minimum_money (최소 주문금액) — int
- deadline (미션 마감 기한) — datetime
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
Notification (알림)
- id (알림 아이디) — bigint — Primary key — NOT NULL
- type_id (알림 유형 아이디) — bigint — Foreign key → Notification_Type.id — NOT NULL
- user_id (유저 아이디) — bigint — Foreign key → User.id — NOT NULL
- is_confirmed (알림 설정) — boolean
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
Notification_Type (알림 유형)
- id (알림 유형 아이디) — bigint — Primary key — NOT NULL
- title (알림 제목) — varchar(20)
- content (알림 내용) — varchar(50)
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
Point_Record (포인트 내역(이력))
- id (포인트 내역 아이디) — bigint — Primary key — NOT NULL
- user_id (유저 아이디) — bigint — Foreign key → User.id — NOT NULL
- title (제목) — varchar(20)
- content (내용(설명)) — varchar(20)
- record_type (내역 유형) — enum(deposit, withdraw)
- amount (포인트 수) — int
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
Restaurant (식당)
- id (식당 아이디) — bigint — Primary key — NOT NULL
- type_id (식당 유형 아이디) — bigint — Foreign key → Food_Type.id — NOT NULL
- name (이름) — varchar(20)
- address (주소) — varchar(30)
- avg_rating (평균 별점) — float
- open_time (오픈 시간) — datetime
- close_time (종료 시간) — datetime
- is_open (가게 상태) — boolean
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
Review (리뷰)
- id (리뷰 아이디) — bigint — Primary key — NOT NULL
- user_id (유저 아이디) — bigint — Foreign key → User.id — NOT NULL
- restaurant_id (식당 아이디) — bigint — Foreign key → Restaurant.id — NOT NULL
- content (리뷰 내용) — varchar(100)
- rating (별점(평가)) — enum(1, 2, 3, 4, 5)
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
User (유저)
- id (유저 아이디) — bigint — Primary key — NOT NULL
- name (이름) — varchar(10)
- gender (성별) — enum(남자, 여자, 선택안함)
- birth (생일) — LocalDate
- address (주소) — varchar(30)
- email (이메일) — varchar(20)
- phone_number (휴대폰 번호) — varchar(15)
- phone_certified (휴대폰 인증 여부) — boolean
- point (포인트) — int
- mission_count (달성 미션 수) — int
- status (상태) — enum(활성, 휴면)
- inactive_date (비활성 날짜) — datetime
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
UserMission (유저의 미션)
- id (유저 미션 아이디) — bigint — Primary key — NOT NULL
- user_id (유저 아이디) — bigint — Foreign key → User.id — NOT NULL
- mission_id (미션 아이디) — bigint — Foreign key → Mission.id — NOT NULL
- is_done (진행 상태) — boolean
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)
User_taste (유저 취향)
- id (유저 취향 아이디) — bigint — Primary key — NOT NULL
- user_id (유저 아이디) — bigint — Foreign key → User.id — NOT NULL
- type_id (식당 유형 아이디) — bigint — Foreign key → Food_Type.id — NOT NULL
- created_at (생성시간) — datetime(6)
- updated_at (수정시간) — datetime(6)