Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Orders
1.1 orderId : 주문을 식별하는 id (PK)
1.2 userId : 사용자를 식별하는 id (FK)
1.3 foodId : 음식을 식별하는 id (FK)
1.4 count : 음식의 수
Foods
2.1 foodId : 음식을 식별하는 id (PK)
2.2 foodName : 음식의 이름
2.3 price : 음식의 가격
Users
3.1 userId : 사용자를 식별하는 id (PK)
3.2 userName : 사용자의 이름
< 관계 종류 >
Users <-> Orders : 일대다 (한 사용자가 여러 주문을 할 수 있다.)
Order <-> Food : 일대다 (한 음식이 여러 주문세 사용될 수 있다.)
DTO 네이밍
RestController로 재구성
@Transactioanl 어노테이션
: 데이터베이스의 상태를 변경하는 'add','update','cancel' 메소드들에다가 어노테이션을 추가함.
API 확장
: 사용자를 추가할 수 있는 API 추가. (RestController로 컨트롤)