Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed #1 #2

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Completed #1 #2

merged 1 commit into from
Nov 22, 2024

Conversation

gyu-nam
Copy link
Owner

@gyu-nam gyu-nam commented Nov 22, 2024

  • 데이터베이스 ERD(Foods,Orders,Users
image
  1. Orders
    1.1 orderId : 주문을 식별하는 id (PK)
    1.2 userId : 사용자를 식별하는 id (FK)
    1.3 foodId : 음식을 식별하는 id (FK)
    1.4 count : 음식의 수

  2. Foods
    2.1 foodId : 음식을 식별하는 id (PK)
    2.2 foodName : 음식의 이름
    2.3 price : 음식의 가격

  3. Users
    3.1 userId : 사용자를 식별하는 id (PK)
    3.2 userName : 사용자의 이름

< 관계 종류 >

  • Users <-> Orders : 일대다 (한 사용자가 여러 주문을 할 수 있다.)

  • Order <-> Food : 일대다 (한 음식이 여러 주문세 사용될 수 있다.)

  • DTO 네이밍

  1. OrderResponseDTO / OrderRequestDTO
  2. UserDTO
  • RestController로 재구성

  • @Transactioanl 어노테이션
    : 데이터베이스의 상태를 변경하는 'add','update','cancel' 메소드들에다가 어노테이션을 추가함.

  • API 확장
    : 사용자를 추가할 수 있는 API 추가. (RestController로 컨트롤)

@gyu-nam gyu-nam requested a review from coke98 November 22, 2024 12:10
@gyu-nam gyu-nam self-assigned this Nov 22, 2024
@gyu-nam gyu-nam merged commit 2771b77 into main Nov 22, 2024
@gyu-nam gyu-nam linked an issue Nov 22, 2024 that may be closed by this pull request
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[데이터베이스 확장]
1 participant