diff --git a/.gitignore b/.gitignore index b068a0e4..36c45c60 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ out/ core/src/main/resources/application.yml application-core.yml /api/src/main/resources/application.yml +core/src/main/generated/ diff --git a/api/src/main/java/dev/handsup/user/controller/UserApiController.java b/api/src/main/java/dev/handsup/user/controller/UserApiController.java index 06907fe7..61c896dd 100644 --- a/api/src/main/java/dev/handsup/user/controller/UserApiController.java +++ b/api/src/main/java/dev/handsup/user/controller/UserApiController.java @@ -7,8 +7,6 @@ import org.springframework.web.bind.annotation.RestController; import dev.handsup.auth.annotation.NoAuth; -import dev.handsup.user.dto.JoinUserApiRequest; -import dev.handsup.user.dto.UserApiMapper; import dev.handsup.user.dto.request.EmailAvailibilityRequest; import dev.handsup.user.dto.request.JoinUserRequest; import dev.handsup.user.dto.response.EmailAvailabilityResponse; @@ -32,10 +30,9 @@ public class UserApiController { @Operation(summary = "회원가입 API", description = "회원가입을 한다") @ApiResponse(useReturnTypeSchema = true) public ResponseEntity join( - final @Valid @RequestBody JoinUserApiRequest request + final @Valid @RequestBody JoinUserRequest request ) { - JoinUserRequest joinUserRequest = UserApiMapper.toJoinUserRequest(request); - Long userId = userService.join(joinUserRequest); + Long userId = userService.join(request); JoinUserResponse response = JoinUserResponse.from(userId); return ResponseEntity.ok(response); } diff --git a/api/src/main/java/dev/handsup/user/dto/UserApiMapper.java b/api/src/main/java/dev/handsup/user/dto/UserApiMapper.java deleted file mode 100644 index ecf3adef..00000000 --- a/api/src/main/java/dev/handsup/user/dto/UserApiMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package dev.handsup.user.dto; - -import static lombok.AccessLevel.*; - -import dev.handsup.user.dto.request.JoinUserRequest; -import lombok.NoArgsConstructor; - -@NoArgsConstructor(access = PRIVATE) -public class UserApiMapper { - public static JoinUserRequest toJoinUserRequest(JoinUserApiRequest request) { - return JoinUserRequest.of( - request.email(), - request.password(), - request.nickname(), - request.si(), - request.gu(), - request.dong(), - request.profileImageUrl() - ); - } -} diff --git a/api/src/test/java/dev/handsup/auction/controller/AuctionApiControllerTest.java b/api/src/test/java/dev/handsup/auction/controller/AuctionApiControllerTest.java index d3df348a..a1f1844c 100644 --- a/api/src/test/java/dev/handsup/auction/controller/AuctionApiControllerTest.java +++ b/api/src/test/java/dev/handsup/auction/controller/AuctionApiControllerTest.java @@ -103,7 +103,7 @@ void getAuctionDetail() throws Exception { .andExpect(jsonPath("$.sellerId").value(user.getId())) .andExpect(jsonPath("$.title").value(auction.getTitle())) .andExpect( - jsonPath("$.productCategory").value(auction.getProduct().getProductCategory().getCategoryValue())) + jsonPath("$.productCategory").value(auction.getProduct().getProductCategory().getValue())) .andExpect(jsonPath("$.initPrice").value(auction.getInitPrice())) .andExpect(jsonPath("$.currentBiddingPrice").value(auction.getCurrentBiddingPrice())) .andExpect(jsonPath("$.endDate").value(auction.getEndDate().toString())) diff --git a/api/src/test/java/dev/handsup/common/support/ApiTestSupport.java b/api/src/test/java/dev/handsup/common/support/ApiTestSupport.java index 536d7851..0f8bfbc3 100644 --- a/api/src/test/java/dev/handsup/common/support/ApiTestSupport.java +++ b/api/src/test/java/dev/handsup/common/support/ApiTestSupport.java @@ -3,6 +3,7 @@ import static org.springframework.http.MediaType.*; import java.util.Arrays; +import java.util.List; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; @@ -16,7 +17,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import dev.handsup.auction.domain.product.product_category.ProductCategoryValue; +import dev.handsup.auction.domain.product.product_category.ProductCategory; import dev.handsup.auction.repository.auction.AuctionRepository; +import dev.handsup.auction.repository.product.ProductCategoryRepository; import dev.handsup.auth.dto.request.LoginRequest; import dev.handsup.auth.dto.response.LoginSimpleResponse; import dev.handsup.auth.exception.AuthErrorCode; @@ -54,6 +58,8 @@ public abstract class ApiTestSupport extends TestContainerSupport { protected AuctionRepository auctionRepository; @Autowired protected AuthService authService; + @Autowired + protected ProductCategoryRepository productCategoryRepository; protected String toJson(Object object) throws JsonProcessingException { return objectMapper.writeValueAsString(object); @@ -73,9 +79,12 @@ public void setUpUser() throws Exception { user.getAddress().getSi(), user.getAddress().getGu(), user.getAddress().getDong(), - user.getProfileImageUrl() + user.getProfileImageUrl(), + List.of(1L) // 선호 카테고리 id ); + productCategoryRepository.save(ProductCategory.of(ProductCategoryValue.BEAUTY_COSMETICS.getLabel())); + mockMvc.perform( MockMvcRequestBuilders .post("/api/users") diff --git a/api/src/test/java/dev/handsup/user/controller/UserApiControllerTest.java b/api/src/test/java/dev/handsup/user/controller/UserApiControllerTest.java index 8b931c7d..77c32d02 100644 --- a/api/src/test/java/dev/handsup/user/controller/UserApiControllerTest.java +++ b/api/src/test/java/dev/handsup/user/controller/UserApiControllerTest.java @@ -5,6 +5,8 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; +import java.util.List; + import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -27,7 +29,8 @@ class UserApiControllerTest extends ApiTestSupport { user.getAddress().getSi(), user.getAddress().getGu(), user.getAddress().getDong(), - user.getProfileImageUrl() + user.getProfileImageUrl(), + List.of(1L) ); @Autowired diff --git a/core/src/main/generated/dev/handsup/auction/domain/QAuction.java b/core/src/main/generated/dev/handsup/auction/domain/QAuction.java deleted file mode 100644 index 10e18e15..00000000 --- a/core/src/main/generated/dev/handsup/auction/domain/QAuction.java +++ /dev/null @@ -1,84 +0,0 @@ -package dev.handsup.auction.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QAuction is a Querydsl query type for Auction - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QAuction extends EntityPathBase { - - private static final long serialVersionUID = -46158260L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QAuction auction = new QAuction("auction"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - public final NumberPath biddingCount = createNumber("biddingCount", Integer.class); - - public final NumberPath bookmarkCount = createNumber("bookmarkCount", Integer.class); - - public final dev.handsup.user.domain.QUser buyer; - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath currentBiddingPrice = createNumber("currentBiddingPrice", Integer.class); - - public final DatePath endDate = createDate("endDate", java.time.LocalDate.class); - - public final NumberPath id = createNumber("id", Long.class); - - public final NumberPath initPrice = createNumber("initPrice", Integer.class); - - public final dev.handsup.auction.domain.product.QProduct product; - - public final dev.handsup.user.domain.QUser seller; - - public final EnumPath status = createEnum("status", dev.handsup.auction.domain.auction_field.AuctionStatus.class); - - public final StringPath title = createString("title"); - - public final EnumPath tradeMethod = createEnum("tradeMethod", dev.handsup.auction.domain.auction_field.TradeMethod.class); - - public final dev.handsup.auction.domain.auction_field.QTradingLocation tradingLocation; - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public QAuction(String variable) { - this(Auction.class, forVariable(variable), INITS); - } - - public QAuction(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QAuction(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QAuction(PathMetadata metadata, PathInits inits) { - this(Auction.class, metadata, inits); - } - - public QAuction(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.buyer = inits.isInitialized("buyer") ? new dev.handsup.user.domain.QUser(forProperty("buyer"), inits.get("buyer")) : null; - this.product = inits.isInitialized("product") ? new dev.handsup.auction.domain.product.QProduct(forProperty("product"), inits.get("product")) : null; - this.seller = inits.isInitialized("seller") ? new dev.handsup.user.domain.QUser(forProperty("seller"), inits.get("seller")) : null; - this.tradingLocation = inits.isInitialized("tradingLocation") ? new dev.handsup.auction.domain.auction_field.QTradingLocation(forProperty("tradingLocation")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/auction/domain/auction_field/QTradingLocation.java b/core/src/main/generated/dev/handsup/auction/domain/auction_field/QTradingLocation.java deleted file mode 100644 index 60af95fb..00000000 --- a/core/src/main/generated/dev/handsup/auction/domain/auction_field/QTradingLocation.java +++ /dev/null @@ -1,41 +0,0 @@ -package dev.handsup.auction.domain.auction_field; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; - - -/** - * QTradingLocation is a Querydsl query type for TradingLocation - */ -@Generated("com.querydsl.codegen.DefaultEmbeddableSerializer") -public class QTradingLocation extends BeanPath { - - private static final long serialVersionUID = -2130568881L; - - public static final QTradingLocation tradingLocation = new QTradingLocation("tradingLocation"); - - public final StringPath dong = createString("dong"); - - public final StringPath gu = createString("gu"); - - public final StringPath si = createString("si"); - - public QTradingLocation(String variable) { - super(TradingLocation.class, forVariable(variable)); - } - - public QTradingLocation(Path path) { - super(path.getType(), path.getMetadata()); - } - - public QTradingLocation(PathMetadata metadata) { - super(TradingLocation.class, metadata); - } - -} - diff --git a/core/src/main/generated/dev/handsup/auction/domain/product/QProduct.java b/core/src/main/generated/dev/handsup/auction/domain/product/QProduct.java deleted file mode 100644 index 04ad16bd..00000000 --- a/core/src/main/generated/dev/handsup/auction/domain/product/QProduct.java +++ /dev/null @@ -1,67 +0,0 @@ -package dev.handsup.auction.domain.product; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QProduct is a Querydsl query type for Product - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QProduct extends EntityPathBase { - - private static final long serialVersionUID = 1591337465L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QProduct product = new QProduct("product"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final StringPath description = createString("description"); - - public final NumberPath id = createNumber("id", Long.class); - - public final ListPath images = this.createList("images", ProductImage.class, QProductImage.class, PathInits.DIRECT2); - - public final dev.handsup.auction.domain.product.product_category.QProductCategory productCategory; - - public final EnumPath purchaseTime = createEnum("purchaseTime", dev.handsup.auction.domain.auction_field.PurchaseTime.class); - - public final EnumPath status = createEnum("status", ProductStatus.class); - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public QProduct(String variable) { - this(Product.class, forVariable(variable), INITS); - } - - public QProduct(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QProduct(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QProduct(PathMetadata metadata, PathInits inits) { - this(Product.class, metadata, inits); - } - - public QProduct(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.productCategory = inits.isInitialized("productCategory") ? new dev.handsup.auction.domain.product.product_category.QProductCategory(forProperty("productCategory")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/auction/domain/product/QProductImage.java b/core/src/main/generated/dev/handsup/auction/domain/product/QProductImage.java deleted file mode 100644 index 3bc11ed5..00000000 --- a/core/src/main/generated/dev/handsup/auction/domain/product/QProductImage.java +++ /dev/null @@ -1,61 +0,0 @@ -package dev.handsup.auction.domain.product; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QProductImage is a Querydsl query type for ProductImage - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QProductImage extends EntityPathBase { - - private static final long serialVersionUID = -1605817630L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QProductImage productImage = new QProductImage("productImage"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - public final StringPath imageUrl = createString("imageUrl"); - - public final QProduct product; - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public QProductImage(String variable) { - this(ProductImage.class, forVariable(variable), INITS); - } - - public QProductImage(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QProductImage(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QProductImage(PathMetadata metadata, PathInits inits) { - this(ProductImage.class, metadata, inits); - } - - public QProductImage(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.product = inits.isInitialized("product") ? new QProduct(forProperty("product"), inits.get("product")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/auction/domain/product/product_category/QProductCategory.java b/core/src/main/generated/dev/handsup/auction/domain/product/product_category/QProductCategory.java deleted file mode 100644 index ae4db09d..00000000 --- a/core/src/main/generated/dev/handsup/auction/domain/product/product_category/QProductCategory.java +++ /dev/null @@ -1,39 +0,0 @@ -package dev.handsup.auction.domain.product.product_category; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; - - -/** - * QProductCategory is a Querydsl query type for ProductCategory - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QProductCategory extends EntityPathBase { - - private static final long serialVersionUID = -1731474077L; - - public static final QProductCategory productCategory = new QProductCategory("productCategory"); - - public final StringPath categoryValue = createString("categoryValue"); - - public final NumberPath id = createNumber("id", Long.class); - - public QProductCategory(String variable) { - super(ProductCategory.class, forVariable(variable)); - } - - public QProductCategory(Path path) { - super(path.getType(), path.getMetadata()); - } - - public QProductCategory(PathMetadata metadata) { - super(ProductCategory.class, metadata); - } - -} - diff --git a/core/src/main/generated/dev/handsup/auction/domain/product/product_category/QProductCategoryLike.java b/core/src/main/generated/dev/handsup/auction/domain/product/product_category/QProductCategoryLike.java deleted file mode 100644 index aa7e4329..00000000 --- a/core/src/main/generated/dev/handsup/auction/domain/product/product_category/QProductCategoryLike.java +++ /dev/null @@ -1,62 +0,0 @@ -package dev.handsup.auction.domain.product.product_category; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QProductCategoryLike is a Querydsl query type for ProductCategoryLike - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QProductCategoryLike extends EntityPathBase { - - private static final long serialVersionUID = -1984657510L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QProductCategoryLike productCategoryLike = new QProductCategoryLike("productCategoryLike"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - public final QProductCategory productCategory; - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public final dev.handsup.user.domain.QUser user; - - public QProductCategoryLike(String variable) { - this(ProductCategoryLike.class, forVariable(variable), INITS); - } - - public QProductCategoryLike(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QProductCategoryLike(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QProductCategoryLike(PathMetadata metadata, PathInits inits) { - this(ProductCategoryLike.class, metadata, inits); - } - - public QProductCategoryLike(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.productCategory = inits.isInitialized("productCategory") ? new QProductCategory(forProperty("productCategory")) : null; - this.user = inits.isInitialized("user") ? new dev.handsup.user.domain.QUser(forProperty("user"), inits.get("user")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/auth/domain/QAuth.java b/core/src/main/generated/dev/handsup/auth/domain/QAuth.java deleted file mode 100644 index 901569ee..00000000 --- a/core/src/main/generated/dev/handsup/auth/domain/QAuth.java +++ /dev/null @@ -1,49 +0,0 @@ -package dev.handsup.auth.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; - - -/** - * QAuth is a Querydsl query type for Auth - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QAuth extends EntityPathBase { - - private static final long serialVersionUID = 933956532L; - - public static final QAuth auth = new QAuth("auth"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - public final StringPath refreshToken = createString("refreshToken"); - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public final NumberPath userId = createNumber("userId", Long.class); - - public QAuth(String variable) { - super(Auth.class, forVariable(variable)); - } - - public QAuth(Path path) { - super(path.getType(), path.getMetadata()); - } - - public QAuth(PathMetadata metadata) { - super(Auth.class, metadata); - } - -} - diff --git a/core/src/main/generated/dev/handsup/auth/domain/QBlacklistToken.java b/core/src/main/generated/dev/handsup/auth/domain/QBlacklistToken.java deleted file mode 100644 index 7e61b734..00000000 --- a/core/src/main/generated/dev/handsup/auth/domain/QBlacklistToken.java +++ /dev/null @@ -1,47 +0,0 @@ -package dev.handsup.auth.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; - - -/** - * QBlacklistToken is a Querydsl query type for BlacklistToken - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QBlacklistToken extends EntityPathBase { - - private static final long serialVersionUID = 941742568L; - - public static final QBlacklistToken blacklistToken = new QBlacklistToken("blacklistToken"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - public final StringPath refreshToken = createString("refreshToken"); - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public QBlacklistToken(String variable) { - super(BlacklistToken.class, forVariable(variable)); - } - - public QBlacklistToken(Path path) { - super(path.getType(), path.getMetadata()); - } - - public QBlacklistToken(PathMetadata metadata) { - super(BlacklistToken.class, metadata); - } - -} - diff --git a/core/src/main/generated/dev/handsup/bidding/domain/QBidding.java b/core/src/main/generated/dev/handsup/bidding/domain/QBidding.java deleted file mode 100644 index 91e941b0..00000000 --- a/core/src/main/generated/dev/handsup/bidding/domain/QBidding.java +++ /dev/null @@ -1,64 +0,0 @@ -package dev.handsup.bidding.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QBidding is a Querydsl query type for Bidding - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QBidding extends EntityPathBase { - - private static final long serialVersionUID = -1637771444L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QBidding bidding = new QBidding("bidding"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - public final dev.handsup.auction.domain.QAuction auction; - - public final dev.handsup.user.domain.QUser bidder; - - public final NumberPath biddingPrice = createNumber("biddingPrice", Integer.class); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public QBidding(String variable) { - this(Bidding.class, forVariable(variable), INITS); - } - - public QBidding(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QBidding(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QBidding(PathMetadata metadata, PathInits inits) { - this(Bidding.class, metadata, inits); - } - - public QBidding(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.auction = inits.isInitialized("auction") ? new dev.handsup.auction.domain.QAuction(forProperty("auction"), inits.get("auction")) : null; - this.bidder = inits.isInitialized("bidder") ? new dev.handsup.user.domain.QUser(forProperty("bidder"), inits.get("bidder")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/bookmark/domain/QBookmark.java b/core/src/main/generated/dev/handsup/bookmark/domain/QBookmark.java deleted file mode 100644 index 44defc18..00000000 --- a/core/src/main/generated/dev/handsup/bookmark/domain/QBookmark.java +++ /dev/null @@ -1,62 +0,0 @@ -package dev.handsup.bookmark.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QBookmark is a Querydsl query type for Bookmark - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QBookmark extends EntityPathBase { - - private static final long serialVersionUID = -1640794928L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QBookmark bookmark = new QBookmark("bookmark"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - public final dev.handsup.auction.domain.QAuction auction; - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public final dev.handsup.user.domain.QUser user; - - public QBookmark(String variable) { - this(Bookmark.class, forVariable(variable), INITS); - } - - public QBookmark(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QBookmark(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QBookmark(PathMetadata metadata, PathInits inits) { - this(Bookmark.class, metadata, inits); - } - - public QBookmark(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.auction = inits.isInitialized("auction") ? new dev.handsup.auction.domain.QAuction(forProperty("auction"), inits.get("auction")) : null; - this.user = inits.isInitialized("user") ? new dev.handsup.user.domain.QUser(forProperty("user"), inits.get("user")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/chat/domain/QChatMessage.java b/core/src/main/generated/dev/handsup/chat/domain/QChatMessage.java deleted file mode 100644 index 44c78d7c..00000000 --- a/core/src/main/generated/dev/handsup/chat/domain/QChatMessage.java +++ /dev/null @@ -1,63 +0,0 @@ -package dev.handsup.chat.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QChatMessage is a Querydsl query type for ChatMessage - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QChatMessage extends EntityPathBase { - - private static final long serialVersionUID = -2135504301L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QChatMessage chatMessage = new QChatMessage("chatMessage"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - public final QChatRoom chatRoom; - - public final StringPath content = createString("content"); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - public final BooleanPath isRead = createBoolean("isRead"); - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public QChatMessage(String variable) { - this(ChatMessage.class, forVariable(variable), INITS); - } - - public QChatMessage(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QChatMessage(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QChatMessage(PathMetadata metadata, PathInits inits) { - this(ChatMessage.class, metadata, inits); - } - - public QChatMessage(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.chatRoom = inits.isInitialized("chatRoom") ? new QChatRoom(forProperty("chatRoom"), inits.get("chatRoom")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/chat/domain/QChatRoom.java b/core/src/main/generated/dev/handsup/chat/domain/QChatRoom.java deleted file mode 100644 index 80699b86..00000000 --- a/core/src/main/generated/dev/handsup/chat/domain/QChatRoom.java +++ /dev/null @@ -1,62 +0,0 @@ -package dev.handsup.chat.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QChatRoom is a Querydsl query type for ChatRoom - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QChatRoom extends EntityPathBase { - - private static final long serialVersionUID = -1639269873L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QChatRoom chatRoom = new QChatRoom("chatRoom"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - public final dev.handsup.user.domain.QUser buyer; - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - public final dev.handsup.user.domain.QUser seller; - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public QChatRoom(String variable) { - this(ChatRoom.class, forVariable(variable), INITS); - } - - public QChatRoom(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QChatRoom(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QChatRoom(PathMetadata metadata, PathInits inits) { - this(ChatRoom.class, metadata, inits); - } - - public QChatRoom(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.buyer = inits.isInitialized("buyer") ? new dev.handsup.user.domain.QUser(forProperty("buyer"), inits.get("buyer")) : null; - this.seller = inits.isInitialized("seller") ? new dev.handsup.user.domain.QUser(forProperty("seller"), inits.get("seller")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/comment/domain/QComment.java b/core/src/main/generated/dev/handsup/comment/domain/QComment.java deleted file mode 100644 index cf709751..00000000 --- a/core/src/main/generated/dev/handsup/comment/domain/QComment.java +++ /dev/null @@ -1,64 +0,0 @@ -package dev.handsup.comment.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QComment is a Querydsl query type for Comment - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QComment extends EntityPathBase { - - private static final long serialVersionUID = 1911681740L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QComment comment = new QComment("comment"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - public final dev.handsup.auction.domain.QAuction auction; - - public final StringPath content = createString("content"); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public final dev.handsup.user.domain.QUser writer; - - public QComment(String variable) { - this(Comment.class, forVariable(variable), INITS); - } - - public QComment(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QComment(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QComment(PathMetadata metadata, PathInits inits) { - this(Comment.class, metadata, inits); - } - - public QComment(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.auction = inits.isInitialized("auction") ? new dev.handsup.auction.domain.QAuction(forProperty("auction"), inits.get("auction")) : null; - this.writer = inits.isInitialized("writer") ? new dev.handsup.user.domain.QUser(forProperty("writer"), inits.get("writer")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/common/entity/QTimeBaseEntity.java b/core/src/main/generated/dev/handsup/common/entity/QTimeBaseEntity.java deleted file mode 100644 index f3e1320c..00000000 --- a/core/src/main/generated/dev/handsup/common/entity/QTimeBaseEntity.java +++ /dev/null @@ -1,39 +0,0 @@ -package dev.handsup.common.entity; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; - - -/** - * QTimeBaseEntity is a Querydsl query type for TimeBaseEntity - */ -@Generated("com.querydsl.codegen.DefaultSupertypeSerializer") -public class QTimeBaseEntity extends EntityPathBase { - - private static final long serialVersionUID = -291636015L; - - public static final QTimeBaseEntity timeBaseEntity = new QTimeBaseEntity("timeBaseEntity"); - - public final DateTimePath createdAt = createDateTime("createdAt", java.time.LocalDateTime.class); - - public final DateTimePath updatedAt = createDateTime("updatedAt", java.time.LocalDateTime.class); - - public QTimeBaseEntity(String variable) { - super(TimeBaseEntity.class, forVariable(variable)); - } - - public QTimeBaseEntity(Path path) { - super(path.getType(), path.getMetadata()); - } - - public QTimeBaseEntity(PathMetadata metadata) { - super(TimeBaseEntity.class, metadata); - } - -} - diff --git a/core/src/main/generated/dev/handsup/notification/domain/QNotification.java b/core/src/main/generated/dev/handsup/notification/domain/QNotification.java deleted file mode 100644 index bb11a949..00000000 --- a/core/src/main/generated/dev/handsup/notification/domain/QNotification.java +++ /dev/null @@ -1,60 +0,0 @@ -package dev.handsup.notification.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QNotification is a Querydsl query type for Notification - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QNotification extends EntityPathBase { - - private static final long serialVersionUID = 1295355578L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QNotification notification = new QNotification("notification"); - - public final dev.handsup.auction.domain.QAuction auction; - - public final StringPath content = createString("content"); - - public final NumberPath id = createNumber("id", Long.class); - - public final BooleanPath isRead = createBoolean("isRead"); - - public final EnumPath type = createEnum("type", NotificationType.class); - - public final dev.handsup.user.domain.QUser user; - - public QNotification(String variable) { - this(Notification.class, forVariable(variable), INITS); - } - - public QNotification(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QNotification(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QNotification(PathMetadata metadata, PathInits inits) { - this(Notification.class, metadata, inits); - } - - public QNotification(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.auction = inits.isInitialized("auction") ? new dev.handsup.auction.domain.QAuction(forProperty("auction"), inits.get("auction")) : null; - this.user = inits.isInitialized("user") ? new dev.handsup.user.domain.QUser(forProperty("user"), inits.get("user")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/review/domain/QReview.java b/core/src/main/generated/dev/handsup/review/domain/QReview.java deleted file mode 100644 index 04859f6e..00000000 --- a/core/src/main/generated/dev/handsup/review/domain/QReview.java +++ /dev/null @@ -1,66 +0,0 @@ -package dev.handsup.review.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QReview is a Querydsl query type for Review - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QReview extends EntityPathBase { - - private static final long serialVersionUID = -1245166060L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QReview review = new QReview("review"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - public final dev.handsup.auction.domain.QAuction auction; - - public final StringPath content = createString("content"); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath evaluationScore = createNumber("evaluationScore", Integer.class); - - public final NumberPath id = createNumber("id", Long.class); - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public final dev.handsup.user.domain.QUser writer; - - public QReview(String variable) { - this(Review.class, forVariable(variable), INITS); - } - - public QReview(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QReview(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QReview(PathMetadata metadata, PathInits inits) { - this(Review.class, metadata, inits); - } - - public QReview(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.auction = inits.isInitialized("auction") ? new dev.handsup.auction.domain.QAuction(forProperty("auction"), inits.get("auction")) : null; - this.writer = inits.isInitialized("writer") ? new dev.handsup.user.domain.QUser(forProperty("writer"), inits.get("writer")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/review/domain/QReviewInterReviewLabel.java b/core/src/main/generated/dev/handsup/review/domain/QReviewInterReviewLabel.java deleted file mode 100644 index 7813d5bb..00000000 --- a/core/src/main/generated/dev/handsup/review/domain/QReviewInterReviewLabel.java +++ /dev/null @@ -1,54 +0,0 @@ -package dev.handsup.review.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QReviewInterReviewLabel is a Querydsl query type for ReviewInterReviewLabel - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QReviewInterReviewLabel extends EntityPathBase { - - private static final long serialVersionUID = 1733440052L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QReviewInterReviewLabel reviewInterReviewLabel = new QReviewInterReviewLabel("reviewInterReviewLabel"); - - public final NumberPath id = createNumber("id", Long.class); - - public final QReview review; - - public final QReviewLabel reviewLabel; - - public QReviewInterReviewLabel(String variable) { - this(ReviewInterReviewLabel.class, forVariable(variable), INITS); - } - - public QReviewInterReviewLabel(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QReviewInterReviewLabel(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QReviewInterReviewLabel(PathMetadata metadata, PathInits inits) { - this(ReviewInterReviewLabel.class, metadata, inits); - } - - public QReviewInterReviewLabel(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.review = inits.isInitialized("review") ? new QReview(forProperty("review"), inits.get("review")) : null; - this.reviewLabel = inits.isInitialized("reviewLabel") ? new QReviewLabel(forProperty("reviewLabel")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/review/domain/QReviewLabel.java b/core/src/main/generated/dev/handsup/review/domain/QReviewLabel.java deleted file mode 100644 index 1b1afb58..00000000 --- a/core/src/main/generated/dev/handsup/review/domain/QReviewLabel.java +++ /dev/null @@ -1,39 +0,0 @@ -package dev.handsup.review.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; - - -/** - * QReviewLabel is a Querydsl query type for ReviewLabel - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QReviewLabel extends EntityPathBase { - - private static final long serialVersionUID = 1089533248L; - - public static final QReviewLabel reviewLabel = new QReviewLabel("reviewLabel"); - - public final NumberPath id = createNumber("id", Long.class); - - public final StringPath value = createString("value"); - - public QReviewLabel(String variable) { - super(ReviewLabel.class, forVariable(variable)); - } - - public QReviewLabel(Path path) { - super(path.getType(), path.getMetadata()); - } - - public QReviewLabel(PathMetadata metadata) { - super(ReviewLabel.class, metadata); - } - -} - diff --git a/core/src/main/generated/dev/handsup/review/domain/QUserReviewLabel.java b/core/src/main/generated/dev/handsup/review/domain/QUserReviewLabel.java deleted file mode 100644 index a8acb6ea..00000000 --- a/core/src/main/generated/dev/handsup/review/domain/QUserReviewLabel.java +++ /dev/null @@ -1,64 +0,0 @@ -package dev.handsup.review.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QUserReviewLabel is a Querydsl query type for UserReviewLabel - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QUserReviewLabel extends EntityPathBase { - - private static final long serialVersionUID = -1289227659L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QUserReviewLabel userReviewLabel = new QUserReviewLabel("userReviewLabel"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - public final NumberPath count = createNumber("count", Integer.class); - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final NumberPath id = createNumber("id", Long.class); - - public final QReviewLabel reviewLabel; - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public final dev.handsup.user.domain.QUser user; - - public QUserReviewLabel(String variable) { - this(UserReviewLabel.class, forVariable(variable), INITS); - } - - public QUserReviewLabel(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QUserReviewLabel(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QUserReviewLabel(PathMetadata metadata, PathInits inits) { - this(UserReviewLabel.class, metadata, inits); - } - - public QUserReviewLabel(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.reviewLabel = inits.isInitialized("reviewLabel") ? new QReviewLabel(forProperty("reviewLabel")) : null; - this.user = inits.isInitialized("user") ? new dev.handsup.user.domain.QUser(forProperty("user"), inits.get("user")) : null; - } - -} - diff --git a/core/src/main/generated/dev/handsup/user/domain/QAddress.java b/core/src/main/generated/dev/handsup/user/domain/QAddress.java deleted file mode 100644 index ab35c939..00000000 --- a/core/src/main/generated/dev/handsup/user/domain/QAddress.java +++ /dev/null @@ -1,41 +0,0 @@ -package dev.handsup.user.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; - - -/** - * QAddress is a Querydsl query type for Address - */ -@Generated("com.querydsl.codegen.DefaultEmbeddableSerializer") -public class QAddress extends BeanPath
{ - - private static final long serialVersionUID = -1445746203L; - - public static final QAddress address = new QAddress("address"); - - public final StringPath dong = createString("dong"); - - public final StringPath gu = createString("gu"); - - public final StringPath si = createString("si"); - - public QAddress(String variable) { - super(Address.class, forVariable(variable)); - } - - public QAddress(Path path) { - super(path.getType(), path.getMetadata()); - } - - public QAddress(PathMetadata metadata) { - super(Address.class, metadata); - } - -} - diff --git a/core/src/main/generated/dev/handsup/user/domain/QUser.java b/core/src/main/generated/dev/handsup/user/domain/QUser.java deleted file mode 100644 index 9242e48a..00000000 --- a/core/src/main/generated/dev/handsup/user/domain/QUser.java +++ /dev/null @@ -1,71 +0,0 @@ -package dev.handsup.user.domain; - -import static com.querydsl.core.types.PathMetadataFactory.*; - -import com.querydsl.core.types.dsl.*; - -import com.querydsl.core.types.PathMetadata; -import javax.annotation.processing.Generated; -import com.querydsl.core.types.Path; -import com.querydsl.core.types.dsl.PathInits; - - -/** - * QUser is a Querydsl query type for User - */ -@Generated("com.querydsl.codegen.DefaultEntitySerializer") -public class QUser extends EntityPathBase { - - private static final long serialVersionUID = 948046714L; - - private static final PathInits INITS = PathInits.DIRECT2; - - public static final QUser user = new QUser("user"); - - public final dev.handsup.common.entity.QTimeBaseEntity _super = new dev.handsup.common.entity.QTimeBaseEntity(this); - - public final QAddress address; - - //inherited - public final DateTimePath createdAt = _super.createdAt; - - public final StringPath email = createString("email"); - - public final NumberPath id = createNumber("id", Long.class); - - public final StringPath nickname = createString("nickname"); - - public final StringPath password = createString("password"); - - public final StringPath profileImageUrl = createString("profileImageUrl"); - - public final NumberPath reportCount = createNumber("reportCount", Integer.class); - - public final NumberPath score = createNumber("score", Integer.class); - - //inherited - public final DateTimePath updatedAt = _super.updatedAt; - - public QUser(String variable) { - this(User.class, forVariable(variable), INITS); - } - - public QUser(Path path) { - this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); - } - - public QUser(PathMetadata metadata) { - this(metadata, PathInits.getFor(metadata, INITS)); - } - - public QUser(PathMetadata metadata, PathInits inits) { - this(User.class, metadata, inits); - } - - public QUser(Class type, PathMetadata metadata, PathInits inits) { - super(type, metadata, inits); - this.address = inits.isInitialized("address") ? new QAddress(forProperty("address")) : null; - } - -} - diff --git a/core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategoryLike.java b/core/src/main/java/dev/handsup/auction/domain/product/product_category/PreferredProductCategory.java similarity index 75% rename from core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategoryLike.java rename to core/src/main/java/dev/handsup/auction/domain/product/product_category/PreferredProductCategory.java index f3046dd1..244846af 100644 --- a/core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategoryLike.java +++ b/core/src/main/java/dev/handsup/auction/domain/product/product_category/PreferredProductCategory.java @@ -21,10 +21,10 @@ @Entity @Getter @NoArgsConstructor(access = PROTECTED) -public class ProductCategoryLike extends TimeBaseEntity { +public class PreferredProductCategory extends TimeBaseEntity { @Id @GeneratedValue(strategy = IDENTITY) - @Column(name = "product_category_like_id") + @Column(name = "preferred_product_category_id") private Long id; @ManyToOne(fetch = LAZY) @@ -40,8 +40,15 @@ public class ProductCategoryLike extends TimeBaseEntity { private ProductCategory productCategory; @Builder - public ProductCategoryLike(User user, ProductCategory productCategory) { + private PreferredProductCategory(User user, ProductCategory productCategory) { this.user = user; this.productCategory = productCategory; } + + public static PreferredProductCategory of(User user, ProductCategory productCategory) { + return PreferredProductCategory.builder() + .user(user) + .productCategory(productCategory) + .build(); + } } diff --git a/core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategory.java b/core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategory.java index 0f27d42d..95058bbd 100644 --- a/core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategory.java +++ b/core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategory.java @@ -20,18 +20,17 @@ public class ProductCategory { @Column(name = "product_category_id") private Long id; - @Column(name = "product_category_value", nullable = false) - private String categoryValue; + @Column(name = "value", nullable = false) + private String value; @Builder - private ProductCategory(String categoryValue) { - this.categoryValue = categoryValue; + private ProductCategory(String value) { + this.value = value; } - // 테스트 전용 - public static ProductCategory of(String categoryValue) { + public static ProductCategory of(String value) { return ProductCategory.builder() - .categoryValue(categoryValue) + .value(value) .build(); } } diff --git a/core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategoryValue.java b/core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategoryValue.java new file mode 100644 index 00000000..889ad88c --- /dev/null +++ b/core/src/main/java/dev/handsup/auction/domain/product/product_category/ProductCategoryValue.java @@ -0,0 +1,25 @@ +package dev.handsup.auction.domain.product.product_category; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@Getter +@RequiredArgsConstructor +public enum ProductCategoryValue { + + DIGITAL_DEVICES("디지털 기기"), + FURNITURE_INTERIOR("가구/인테리어"), + FASHION_ACCESSORIES("패션/잡화"), + HOUSEHOLD_APPLIANCES("생활가전"), + LIVING_KITCHEN("생활/주방"), + SPORTS_LEISURE("스포츠/레저"), + HOBBIES_GAMES_RECORDS("취미/게임/음반"), + BEAUTY_COSMETICS("뷰티/미용"), + PET_SUPPLIES("반려동물용품"), + TICKETS_VOUCHERS("티켓/교환권"), + BOOKS("도서"), + CHILDREN_BOOKS("유아도서"), + OTHER_USED_GOODS("기타 중고 물품"); + + private final String label; +} diff --git a/core/src/main/java/dev/handsup/auction/dto/mapper/AuctionMapper.java b/core/src/main/java/dev/handsup/auction/dto/mapper/AuctionMapper.java index c2ad283b..355cb48b 100644 --- a/core/src/main/java/dev/handsup/auction/dto/mapper/AuctionMapper.java +++ b/core/src/main/java/dev/handsup/auction/dto/mapper/AuctionMapper.java @@ -45,7 +45,7 @@ public static AuctionDetailResponse toAuctionDetailResponse(Auction auction) { auction.getId(), auction.getSeller().getId(), auction.getTitle(), - auction.getProduct().getProductCategory().getCategoryValue(), + auction.getProduct().getProductCategory().getValue(), auction.getInitPrice(), auction.getCurrentBiddingPrice(), auction.getEndDate().toString(), diff --git a/core/src/main/java/dev/handsup/auction/repository/auction/AuctionQueryRepositoryImpl.java b/core/src/main/java/dev/handsup/auction/repository/auction/AuctionQueryRepositoryImpl.java index 652e8ddc..d607a027 100644 --- a/core/src/main/java/dev/handsup/auction/repository/auction/AuctionQueryRepositoryImpl.java +++ b/core/src/main/java/dev/handsup/auction/repository/auction/AuctionQueryRepositoryImpl.java @@ -106,7 +106,7 @@ private BooleanExpression keywordContains(String keyword) { } private BooleanExpression categoryEq(String productCategory) { - return hasText(productCategory) ? product.productCategory.categoryValue.eq(productCategory) : null; + return hasText(productCategory) ? product.productCategory.value.eq(productCategory) : null; } private BooleanExpression tradeMethodEq(String tradeMethod) { diff --git a/core/src/main/java/dev/handsup/auction/repository/product/PreferredProductCategoryRepository.java b/core/src/main/java/dev/handsup/auction/repository/product/PreferredProductCategoryRepository.java new file mode 100644 index 00000000..1cd2ab7d --- /dev/null +++ b/core/src/main/java/dev/handsup/auction/repository/product/PreferredProductCategoryRepository.java @@ -0,0 +1,8 @@ +package dev.handsup.auction.repository.product; + +import org.springframework.data.jpa.repository.JpaRepository; + +import dev.handsup.auction.domain.product.product_category.PreferredProductCategory; + +public interface PreferredProductCategoryRepository extends JpaRepository { +} diff --git a/core/src/main/java/dev/handsup/auction/repository/product/ProductCategoryRepository.java b/core/src/main/java/dev/handsup/auction/repository/product/ProductCategoryRepository.java index 1acb6613..2d336929 100644 --- a/core/src/main/java/dev/handsup/auction/repository/product/ProductCategoryRepository.java +++ b/core/src/main/java/dev/handsup/auction/repository/product/ProductCategoryRepository.java @@ -8,5 +8,5 @@ public interface ProductCategoryRepository extends JpaRepository { - Optional findByCategoryValue(String categoryValue); + Optional findByValue(String value); } diff --git a/core/src/main/java/dev/handsup/auction/service/AuctionService.java b/core/src/main/java/dev/handsup/auction/service/AuctionService.java index afa36757..8ac9bf06 100644 --- a/core/src/main/java/dev/handsup/auction/service/AuctionService.java +++ b/core/src/main/java/dev/handsup/auction/service/AuctionService.java @@ -58,7 +58,7 @@ public PageResponse getRecommendAuctions(String si, St } private ProductCategory getProductCategoryEntity(RegisterAuctionRequest request) { - return productCategoryRepository.findByCategoryValue(request.productCategory()). + return productCategoryRepository.findByValue(request.productCategory()). orElseThrow(() -> new NotFoundException(NOT_FOUND_PRODUCT_CATEGORY)); } diff --git a/core/src/main/java/dev/handsup/user/dto/request/JoinUserRequest.java b/core/src/main/java/dev/handsup/user/dto/request/JoinUserRequest.java index d397a453..8a7ec745 100644 --- a/core/src/main/java/dev/handsup/user/dto/request/JoinUserRequest.java +++ b/core/src/main/java/dev/handsup/user/dto/request/JoinUserRequest.java @@ -2,18 +2,40 @@ import static lombok.AccessLevel.*; +import java.util.List; + +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; import lombok.Builder; @Builder(access = PRIVATE) public record JoinUserRequest( + @NotBlank(message = "email 값이 공백입니다.") + @Pattern(regexp = "^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z]){0,19}" + + "@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z]){0,19}[.][a-zA-Z]{2,3}$", + message = "이메일 주소 양식을 확인해주세요.") String email, + + @NotBlank(message = "password 값이 공백입니다.") String password, + + @NotBlank(message = "nickname 값이 공백입니다.") String nickname, + + @NotBlank(message = "주소의 시 값이 공백입니다.") String si, + + @NotBlank(message = "주소의 구 값이 공백입니다.") String gu, + + @NotBlank(message = "주소의 동 값이 공백입니다.") String dong, - String profileImageUrl + + @NotBlank(message = "profileImageUrl 은 필수입니다.") + String profileImageUrl, + + List productCategoryIds ) { public static JoinUserRequest of( String email, @@ -22,7 +44,8 @@ public static JoinUserRequest of( String si, String gu, String dong, - String profileImageUrl + String profileImageUrl, + List productCategoryIds ) { return JoinUserRequest.builder() .email(email) @@ -32,6 +55,7 @@ public static JoinUserRequest of( .gu(gu) .dong(dong) .profileImageUrl(profileImageUrl) + .productCategoryIds(productCategoryIds) .build(); } } diff --git a/core/src/main/java/dev/handsup/user/service/UserService.java b/core/src/main/java/dev/handsup/user/service/UserService.java index e838b633..6f3b73bc 100644 --- a/core/src/main/java/dev/handsup/user/service/UserService.java +++ b/core/src/main/java/dev/handsup/user/service/UserService.java @@ -3,10 +3,15 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import dev.handsup.auction.domain.product.product_category.PreferredProductCategory; +import dev.handsup.auction.domain.product.product_category.ProductCategory; +import dev.handsup.auction.repository.product.PreferredProductCategoryRepository; +import dev.handsup.auction.repository.product.ProductCategoryRepository; import dev.handsup.auth.domain.EncryptHelper; import dev.handsup.common.exception.CommonErrorCode; import dev.handsup.common.exception.NotFoundException; import dev.handsup.common.exception.ValidationException; +import dev.handsup.common.service.EntityManagementService; import dev.handsup.user.domain.User; import dev.handsup.user.dto.UserMapper; import dev.handsup.user.dto.request.EmailAvailibilityRequest; @@ -22,6 +27,9 @@ public class UserService { private final UserRepository userRepository; private final EncryptHelper encryptHelper; + private final PreferredProductCategoryRepository preferredProductCategoryRepository; + private final ProductCategoryRepository productCategoryRepository; + private final EntityManagementService entityManagementService; public User getUserById(Long userId) { return userRepository.findById(userId) @@ -37,7 +45,18 @@ public User getUserByEmail(String email) { public Long join(JoinUserRequest request) { validateDuplicateEmail(request.email()); User user = UserMapper.toUser(request, encryptHelper); - return userRepository.save(user).getId(); + User savedUser = userRepository.save(user); // 저장된 유저 확인 + + request.productCategoryIds().forEach(productCategoryId -> { + ProductCategory productCategory = entityManagementService.getEntity( + productCategoryRepository, productCategoryId + ); + preferredProductCategoryRepository.save( + PreferredProductCategory.of(savedUser, productCategory) + ); + }); + + return savedUser.getId(); } public EmailAvailabilityResponse isEmailAvailable(EmailAvailibilityRequest request) { diff --git a/core/src/test/java/dev/handsup/auction/repository/auction/AuctionQueryRepositoryImplTest.java b/core/src/test/java/dev/handsup/auction/repository/auction/AuctionQueryRepositoryImplTest.java index 0cbeebca..705d3420 100644 --- a/core/src/test/java/dev/handsup/auction/repository/auction/AuctionQueryRepositoryImplTest.java +++ b/core/src/test/java/dev/handsup/auction/repository/auction/AuctionQueryRepositoryImplTest.java @@ -57,7 +57,7 @@ void searchAuction_category_filter() { //given Auction auction1 = AuctionFixture.auction(category1); Auction auction2 = AuctionFixture.auction(category2); - assertThat(auction1.getProduct().getProductCategory().getCategoryValue()).isEqualTo(DIGITAL_DEVICE); + assertThat(auction1.getProduct().getProductCategory().getValue()).isEqualTo(DIGITAL_DEVICE); auctionRepository.saveAll(List.of(auction1, auction2)); AuctionSearchCondition condition = AuctionSearchCondition.builder() diff --git a/core/src/test/java/dev/handsup/auction/service/AuctionServiceTest.java b/core/src/test/java/dev/handsup/auction/service/AuctionServiceTest.java index 8ad27d04..3f565d6e 100644 --- a/core/src/test/java/dev/handsup/auction/service/AuctionServiceTest.java +++ b/core/src/test/java/dev/handsup/auction/service/AuctionServiceTest.java @@ -81,7 +81,7 @@ void registerAuction() { "동선동" ); - given(productCategoryRepository.findByCategoryValue(DIGITAL_DEVICE)) + given(productCategoryRepository.findByValue(DIGITAL_DEVICE)) .willReturn(Optional.of(productCategory)); given(auctionRepository.save(any(Auction.class))).willReturn(auction); diff --git a/core/src/test/java/dev/handsup/user/service/UserServiceTest.java b/core/src/test/java/dev/handsup/user/service/UserServiceTest.java index c547f133..cfb7bc6e 100644 --- a/core/src/test/java/dev/handsup/user/service/UserServiceTest.java +++ b/core/src/test/java/dev/handsup/user/service/UserServiceTest.java @@ -4,6 +4,7 @@ import static org.assertj.core.api.Assertions.*; import static org.mockito.BDDMockito.*; +import java.util.List; import java.util.Optional; import org.junit.jupiter.api.DisplayName; @@ -12,10 +13,18 @@ import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; - +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; + +import dev.handsup.auction.domain.product.product_category.PreferredProductCategory; +import dev.handsup.auction.domain.product.product_category.ProductCategoryValue; +import dev.handsup.auction.domain.product.product_category.ProductCategory; +import dev.handsup.auction.repository.product.PreferredProductCategoryRepository; +import dev.handsup.auction.repository.product.ProductCategoryRepository; import dev.handsup.auth.domain.EncryptHelper; import dev.handsup.common.exception.NotFoundException; import dev.handsup.common.exception.ValidationException; +import dev.handsup.common.service.EntityManagementService; import dev.handsup.fixture.UserFixture; import dev.handsup.user.domain.User; import dev.handsup.user.dto.request.JoinUserRequest; @@ -29,18 +38,26 @@ class UserServiceTest { private UserRepository userRepository; @Mock private EncryptHelper encryptHelper; + @Mock + private EntityManagementService entityManagementService; + @Mock + private ProductCategoryRepository productCategoryRepository; + @Mock + private PreferredProductCategoryRepository preferredProductCategoryRepository; + @InjectMocks private UserService userService; - private User user = UserFixture.user(); - private JoinUserRequest request = JoinUserRequest.of( + private final User user = UserFixture.user(); + private final JoinUserRequest request = JoinUserRequest.of( user.getEmail(), user.getPassword(), user.getNickname(), user.getAddress().getSi(), user.getAddress().getGu(), user.getAddress().getDong(), - user.getProfileImageUrl() + user.getProfileImageUrl(), + List.of(1L) ); @Test @@ -73,6 +90,7 @@ void getUserByIdFailTest() { } @Test + @MockitoSettings(strictness = Strictness.LENIENT) @DisplayName("[회원가입을 성공한다]") void joinSuccessTest() { // given @@ -85,6 +103,12 @@ void joinSuccessTest() { given(userRepository.save(any(User.class))) .willReturn(savedUser); + ProductCategory productCategory = ProductCategory.of(ProductCategoryValue.SPORTS_LEISURE.getLabel()); + given(entityManagementService.getEntity(productCategoryRepository, 1L)) + .willReturn(productCategory); + given(preferredProductCategoryRepository.save(PreferredProductCategory.of(savedUser, productCategory))) + .willReturn(PreferredProductCategory.of(savedUser, productCategory)); + // when Long userId = userService.join(request);