Skip to content

Commit

Permalink
Merge pull request #21 from Team-A-Mango/20-delete-tag
Browse files Browse the repository at this point in the history
Tag 삭제
  • Loading branch information
11dlguswns authored Dec 17, 2024
2 parents 97a234a + 85c705d commit 9ef8a48
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 131 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.mango.amango.domain.product.presentation.dto.request;

import com.mango.amango.domain.tag.entity.Category;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.util.List;

public record CreateProductReq(
@NotBlank(message = "제목은 비어 있을 수 없습니다.")
Expand All @@ -14,11 +11,7 @@ public record CreateProductReq(
String description,

@NotNull(message = "가격은 필수 입력 값 입니다.")
Long price,

@NotNull(message = "태그는 필수 입력 값 입니다.")
@Size(min = 1, message = "태그는 최소 1개 이상 포함되어야 합니다.")
List<Category> tags
Long price
) {

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.mango.amango.domain.product.presentation.dto.request.CreateProductReq;
import com.mango.amango.domain.product.repository.ProductRepository;
import com.mango.amango.domain.product.service.CreateProductService;
import com.mango.amango.domain.tag.service.impl.SaveTagServiceImpl;
import com.mango.amango.domain.user.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
Expand All @@ -21,7 +20,6 @@ public class CreateProductServiceImpl implements CreateProductService {

private final ProductRepository productRepository;
private final UserService userService;
private final SaveTagServiceImpl saveTagService;
private final ImageUploadService imageUploadService;

@Override
Expand All @@ -35,7 +33,6 @@ public void createProduct(CreateProductReq request, List<MultipartFile> images)
.build();

productRepository.save(product);
saveTagService.saveTag(product, request.tags());
imageUploadService.saveImage(product, images);
}
}
15 changes: 0 additions & 15 deletions src/main/java/com/mango/amango/domain/tag/entity/Category.java

This file was deleted.

25 changes: 0 additions & 25 deletions src/main/java/com/mango/amango/domain/tag/entity/Tag.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 9ef8a48

Please sign in to comment.