-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into Feature-frontMarkup
- Loading branch information
Showing
99 changed files
with
3,702 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,94 @@ | ||
.DS_Store | ||
node_modules | ||
node_modules | ||
bower_components | ||
|
||
*.sublime* | ||
|
||
psd | ||
thumb | ||
sketch | ||
|
||
### Swift ### | ||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
## User settings | ||
./MenuCanvas/xcuserdata/ | ||
|
||
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) | ||
./MenuCanvas/*.xcscmblueprint | ||
./MenuCanvas/*.xccheckout | ||
|
||
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) | ||
./MenuCanvas/build/ | ||
./MenuCanvas/DerivedData/ | ||
./MenuCanvas/*.moved-aside | ||
./MenuCanvas/*.pbxuser | ||
!default.pbxuser | ||
./MenuCanvas/*.mode1v3 | ||
!default.mode1v3 | ||
./MenuCanvas/*.mode2v3 | ||
!default.mode2v3 | ||
./MenuCanvas/*.perspectivev3 | ||
!default.perspectivev3 | ||
|
||
## Obj-C/Swift specific | ||
./MenuCanvas/*.hmap | ||
|
||
## App packaging | ||
./MenuCanvas/*.ipa | ||
./MenuCanvas/*.dSYM.zip | ||
./MenuCanvas/*.dSYM | ||
|
||
## Playgrounds | ||
./MenuCanvas/timeline.xctimeline | ||
./MenuCanvas/playground.xcworkspace | ||
|
||
# Swift Package Manager | ||
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. | ||
# Packages/ | ||
# Package.pins | ||
# Package.resolved | ||
# *.xcodeproj | ||
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata | ||
# hence it is not needed unless you have added a package configuration file to your project | ||
# .swiftpm | ||
|
||
./MenuCanvas/.build/ | ||
|
||
# CocoaPods | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
# Pods/ | ||
# Add this line if you want to avoid checking in source code from the Xcode workspace | ||
# *.xcworkspace | ||
./MenuCanvas/Pods | ||
# Carthage | ||
# Add this line if you want to avoid checking in source code from Carthage dependencies. | ||
# Carthage/Checkouts | ||
|
||
./MenuCanvas/Carthage/Build/ | ||
|
||
# Accio dependency management | ||
Dependencies/ | ||
.accio/ | ||
|
||
# fastlane | ||
# It is recommended to not store the screenshots in the git repo. | ||
# Instead, use fastlane to re-generate the screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/#source-control | ||
|
||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots/**/*.png | ||
fastlane/test_output | ||
|
||
# Code Injection | ||
# After new code Injection tools there's a generated folder /iOSInjectionProject | ||
# https://github.com/johnno1962/injectionforxcode | ||
|
||
iOSInjectionProject/ | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/swift,cocoapods,git,java,react,kotlin,database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
node_modules | ||
bower_components | ||
|
||
*.sublime* | ||
|
||
psd | ||
thumb | ||
sketch | ||
|
||
### Swift ### | ||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
## User settings | ||
xcuserdata/ | ||
|
||
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) | ||
*.xcscmblueprint | ||
*.xccheckout | ||
|
||
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) | ||
build/ | ||
DerivedData/ | ||
*.moved-aside | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
|
||
## Obj-C/Swift specific | ||
*.hmap | ||
|
||
## App packaging | ||
*.ipa | ||
*.dSYM.zip | ||
*.dSYM | ||
|
||
## Playgrounds | ||
timeline.xctimeline | ||
playground.xcworkspace | ||
|
||
# Swift Package Manager | ||
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. | ||
# Packages/ | ||
# Package.pins | ||
# Package.resolved | ||
# *.xcodeproj | ||
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata | ||
# hence it is not needed unless you have added a package configuration file to your project | ||
# .swiftpm | ||
|
||
.build/ | ||
|
||
# CocoaPods | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
# Pods/ | ||
# Add this line if you want to avoid checking in source code from the Xcode workspace | ||
# *.xcworkspace | ||
|
||
# Carthage | ||
# Add this line if you want to avoid checking in source code from Carthage dependencies. | ||
# Carthage/Checkouts | ||
|
||
Carthage/Build/ | ||
|
||
# Accio dependency management | ||
Dependencies/ | ||
.accio/ | ||
|
||
# fastlane | ||
# It is recommended to not store the screenshots in the git repo. | ||
# Instead, use fastlane to re-generate the screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/#source-control | ||
|
||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots/**/*.png | ||
fastlane/test_output | ||
|
||
# Code Injection | ||
# After new code Injection tools there's a generated folder /iOSInjectionProject | ||
# https://github.com/johnno1962/injectionforxcode | ||
|
||
iOSInjectionProject/ | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/swift,cocoapods,git,java,react,kotlin,database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# ✨오더캔버스 ✨ | ||
# ✨메뉴 캔버스 ✨ | ||
|
||
## 손쉽게 이쁜 디지털 메뉴판을 만들어보세요. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
backend/src/main/java/com/hummingbird/backend/BackendApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
backend/src/main/java/com/hummingbird/backend/category/controller/CategoryController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.hummingbird.backend.category.controller; | ||
|
||
import com.hummingbird.backend.category.dto.CreateCategoryDto; | ||
import com.hummingbird.backend.category.service.CategoryService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class CategoryController { | ||
private CategoryService categoryService; | ||
|
||
@Autowired | ||
public CategoryController(CategoryService categoryService) { | ||
this.categoryService = categoryService; | ||
} | ||
|
||
@PostMapping("/category/new") | ||
public Long createCategory(@RequestBody CreateCategoryDto dto, @RequestParam("menuId") Long menuId){ | ||
return categoryService.create(dto,menuId); | ||
} | ||
|
||
@PostMapping("/category/update") | ||
public Long updateCategory(Long id,String name){ | ||
return categoryService.update(id, name); | ||
} | ||
|
||
@PostMapping("/category/delete") | ||
public boolean deleteCategory(Long id) { | ||
return categoryService.delete(id); | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
backend/src/main/java/com/hummingbird/backend/category/domain/Category.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.hummingbird.backend.category.domain; | ||
|
||
import com.hummingbird.backend.food.domain.Food; | ||
import com.hummingbird.backend.menu.domain.Menu; | ||
import lombok.*; | ||
|
||
import javax.persistence.*; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static javax.persistence.FetchType.*; | ||
|
||
@Getter | ||
@Entity | ||
@ToString | ||
@Setter | ||
@NoArgsConstructor | ||
public class Category { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Column(name = "name") | ||
private String name; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "menu_id") | ||
private Menu menu; | ||
|
||
@OneToMany(mappedBy = "category",cascade = CascadeType.REMOVE) | ||
private List<Food> foodList = new ArrayList<>(); | ||
|
||
@Builder | ||
public Category(Long id, String name, Menu menu) { | ||
this.id = id; | ||
this.name = name; | ||
this.menu = menu; | ||
} | ||
|
||
public void changeName(String name){ | ||
this.name = name; | ||
} | ||
} |
Oops, something went wrong.