Search

3주차 - 콘서트 예약 엔티티 및 ERD 설계

생성일
2025/04/22 14:28
태그

엔티티 설계 및 ERD 작성

ERD

Table user { id integer [primary key] username varchar [not null] user_uuid varchar [not null] balance integer [not null] created_at timestamp [not null] updated_at timestamp [not null] } Table queue { id integer [primary key] user_uuid integer [not null] token_uuid varchar [not null] activate_status varchar [not null] expired_at timestamp [not null] created_at timestamp [not null] updated_at timestamp [not null] } Table concert { id integer [primary key] title varchar [not null] provider varchar [not null] created_at timestamp [not null] updated_at timestamp [not null] } Table concert_schedule { id integer [primary key] concert_id integer [not null] total_seat integer [not null] startAt timestamp [not null] endAt timestamp created_at timestamp [not null] updated_at timestamp [not null] } Table concert_seat { id integer [primary key] concert_schedule_id integer [not null] seat_number integer [not null] price integer [not null] created_at timestamp [not null] updated_at timestamp [not null] } Table reservation { id integer [primary key] user_id integer [not null] concert_id integer [not null] concert_schedule_id integer [not null] seat_id integer [not null] expried_at timestamp [not null] created_at timestamp [not null] updated_at timestamp [not null] } Table point_history { id integer [primary key] user_id integer [not null] type varchar [not null] amount integer [not null] created_at timestamp [not null] updated_at timestamp [not null] } Table payment { id integer [primary key] user_id integer [not null] reservation_id integer [not null] price integer [not null] created_at timestamp [not null] updated_at timestamp [not null] } Ref: point_history.user_id > user.id Ref: concert.id < concert_schedule.concert_id Ref: concert_schedule.id < concert_seat.concert_schedule_id Ref: user.id - reservation.user_id Ref: concert_seat.id - reservation.seat_id Ref: reservation.id - payment.reservation_id Ref: payment.user_id > user.id
Kotlin
복사