Skip to content

Commit

Permalink
[FIX] E7-S3 uid 주석 처리 #99
Browse files Browse the repository at this point in the history
- 태희님과 협의하에 uid는 주석 처리하고, 목표한 기간 이후에 추가하기로 하였습니다.
  • Loading branch information
nrudev committed Nov 17, 2021
1 parent 412c5ed commit 5f3a113
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class CategoryDto {

private Long id;
private String uid;
// private String uid;
private String name;
private String icon;
private String url;
Expand All @@ -25,7 +25,7 @@ public class CategoryDto {

public CategoryDto(Category category) {
this.id = category.getId();
this.uid = category.getUid();
// this.uid = category.getUid();
this.name = category.getName();
this.icon = category.getIcon();
this.url = category.getUrl();
Expand All @@ -37,9 +37,9 @@ public CategoryDto(Category category) {
}

@Builder
public CategoryDto(Long id, String uid, String name, String icon, String url, Long orders, String showYn, Menu menu, Account account, Account updater) {
public CategoryDto(Long id,/* String uid,*/ String name, String icon, String url, Long orders, String showYn, Menu menu, Account account, Account updater) {
this.id = id;
this.uid = uid;
// this.uid = uid;
this.name = name;
this.icon = icon;
this.url = url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@Getter
public class CategorySaveRequestDto {

private String uid;
// private String uid;
private String name;
private String icon;
private String url;
Expand All @@ -20,8 +20,8 @@ public class CategorySaveRequestDto {
private Account account;

@Builder
public CategorySaveRequestDto(String uid, String name, String icon, String url, Long orders, String showYn, Menu menu, Account account) {
this.uid = uid;
public CategorySaveRequestDto(/*String uid, */String name, String icon, String url, Long orders, String showYn, Menu menu, Account account) {
// this.uid = uid;
this.name = name;
this.icon = icon;
this.url = url;
Expand All @@ -32,7 +32,7 @@ public CategorySaveRequestDto(String uid, String name, String icon, String url,

public Category toEntity() {
return Category.builder()
.uid(uid)
// .uid(uid)
.name(name)
.icon(icon)
.url(url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public class MenuDto {

private Long id;
private String uid;
// private String uid;
private String name;
private String icon;
private String url;
Expand All @@ -26,7 +26,7 @@ public class MenuDto {

public MenuDto(Menu menu) {
this.id = menu.getId();
this.uid = menu.getUid();
// this.uid = menu.getUid();
this.name = menu.getName();
this.icon = menu.getIcon();
this.url = menu.getUrl();
Expand All @@ -38,9 +38,9 @@ public MenuDto(Menu menu) {
}

@Builder
public MenuDto(Long id, String uid, String name, String icon, String url, Long orders, String showYn, List<Category> categoryList, Account account, Account updater) {
public MenuDto(Long id,/* String uid,*/ String name, String icon, String url, Long orders, String showYn, List<Category> categoryList, Account account, Account updater) {
this.id = id;
this.uid = uid;
// this.uid = uid;
this.name = name;
this.icon = icon;
this.url = url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@Getter
public class MenuSaveRequestDto {

private String uid;
// private String uid;
private String name;
private String icon;
private String url;
Expand All @@ -20,8 +20,8 @@ public class MenuSaveRequestDto {
private Account account;

@Builder
public MenuSaveRequestDto(String uid, String name, String icon, String url, Long orders, String showYn, Account account) {
this.uid = uid;
public MenuSaveRequestDto(/*String uid,*/String name, String icon, String url, Long orders, String showYn, Account account) {
// this.uid = uid;
this.name = name;
this.icon = icon;
this.url = url;
Expand All @@ -32,7 +32,7 @@ public MenuSaveRequestDto(String uid, String name, String icon, String url, Long

public Menu toEntity() {
return Menu.builder()
.uid(uid)
// .uid(uid)
.name(name)
.icon(icon)
.url(url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Category extends BaseTimeEntity {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String uid;
// private String uid;

private String name;

Expand All @@ -47,8 +47,8 @@ public class Category extends BaseTimeEntity {
private Account updater; // 최근에 업데이트한 사용자

@Builder
public Category(String uid, String name, String icon, String url, Long orders, String showYn, Menu menu, Account account, Account updater) {
this.uid = uid;
public Category(/*String uid, */String name, String icon, String url, Long orders, String showYn, Menu menu, Account account, Account updater) {
// this.uid = uid;
this.name = name;
this.icon = icon;
this.url = url;
Expand All @@ -62,7 +62,7 @@ public Category(String uid, String name, String icon, String url, Long orders, S
public CategoryDto fromEntity() {
return CategoryDto.builder()
.id(id)
.uid(uid)
// .uid(uid)
.name(name)
.icon(icon)
.url(url)
Expand Down
8 changes: 4 additions & 4 deletions backend/src/main/java/com/infp/ciat/category/entity/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class Menu extends BaseTimeEntity {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String uid;
// private String uid;

private String name;

Expand Down Expand Up @@ -57,8 +57,8 @@ public class Menu extends BaseTimeEntity {
private Account updater;

@Builder
public Menu(String uid, String name, String icon, String url, Long orders, String showYn, Account account) {
this.uid = uid;
public Menu(/*String uid, */String name, String icon, String url, Long orders, String showYn, Account account) {
// this.uid = uid;
this.name = name;
this.icon = icon;
this.url = url;
Expand All @@ -70,7 +70,7 @@ public Menu(String uid, String name, String icon, String url, Long orders, Strin
public MenuDto fromEntity() {
return MenuDto.builder()
.id(id)
.uid(uid)
// .uid(uid)
.name(name)
.icon(icon)
.url(url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public List<CategoryDto> getList() {
.stream()
.map(c -> CategoryDto.builder()
.id(c.getId())
.uid(c.getUid())
// .uid(c.getUid())
.name(c.getName())
.icon(c.getIcon())
.url(c.getUrl())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public List<MenuDto> getList() {
.stream()
.map(m -> MenuDto.builder()
.id(m.getId())
.uid(m.getUid())
// .uid(m.getUid())
.name(m.getName())
.icon(m.getIcon())
.url(m.getUrl())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CategoryServiceTest {
@BeforeEach
void createMenu() {
MenuSaveRequestDto menuSaveRequestDto = MenuSaveRequestDto.builder()
.uid("M001")
// .uid("M001")
.name("test menu")
.icon("test")
.url("https://www.naver.com")
Expand All @@ -61,7 +61,7 @@ public void createCategory() {
Menu menu = menuRepository.findAll().get(0);

CategorySaveRequestDto requestDto = CategorySaveRequestDto.builder()
.uid(uid)
// .uid(uid)
.name(name)
.icon(icon)
.url(url)
Expand All @@ -75,7 +75,7 @@ public void createCategory() {
// then
List<Category> all = categoryRepository.findAll();

assertThat(all.get(0).getUid()).isEqualTo(uid);
// assertThat(all.get(0).getUid()).isEqualTo(uid);
assertThat(all.get(0).getName()).isEqualTo(name);
assertThat(all.get(0).getIcon()).isEqualTo(icon);
assertThat(all.get(0).getUrl()).isEqualTo(url);
Expand All @@ -88,15 +88,15 @@ public void createCategory() {
public void getCategoryList() {
// given
CategorySaveRequestDto requestDto = CategorySaveRequestDto.builder()
.uid("M001C001")
// .uid("M001C001")
.name("테스트1")
.icon("test")
.url("/test")
.orders(1L)
.menu(menuRepository.findAll().get(0))
.build();
CategorySaveRequestDto requestDto2 = CategorySaveRequestDto.builder()
.uid("M001C002")
// .uid("M001C002")
.name("테스트2")
.icon("test2")
.url("/test2")
Expand Down Expand Up @@ -127,7 +127,7 @@ public void getOneCategory() {
Menu menu = menuRepository.findAll().get(0);

Category savedCat = categoryRepository.save(Category.builder()
.uid(uid)
// .uid(uid)
.name(name)
.icon(icon)
.url(url)
Expand All @@ -140,7 +140,7 @@ public void getOneCategory() {
CategoryDto detail = categoryService.getDetail(savedCat.getId());

// then
assertThat(detail.getUid()).isEqualTo(uid);
// assertThat(detail.getUid()).isEqualTo(uid);
assertThat(detail.getName()).isEqualTo(name);
assertThat(detail.getIcon()).isEqualTo(icon);
assertThat(detail.getUrl()).isEqualTo(url);
Expand All @@ -153,7 +153,7 @@ public void getOneCategory() {
public void updateCategory() {
// given
Category savedCat = categoryRepository.save(Category.builder()
.uid("M001C001")
// .uid("M001C001")
.name("테스트1")
.icon("test")
.url("/test")
Expand Down Expand Up @@ -184,7 +184,7 @@ public void updateCategory() {
public void deleteCategory() {
// given
Category savedCat1 = categoryRepository.save(Category.builder()
.uid("M001C001")
// .uid("M001C001")
.name("테스트1")
.icon("test")
.url("/test")
Expand All @@ -193,7 +193,7 @@ public void deleteCategory() {
.menu(menuRepository.findAll().get(0))
.build());
Category savedCat2 = categoryRepository.save(Category.builder()
.uid("M001C002")
// .uid("M001C002")
.name("테스트2")
.icon("test2")
.url("/test2")
Expand Down
Loading

0 comments on commit 5f3a113

Please sign in to comment.