Skip to content

Commit

Permalink
Merge pull request #233 from PLADI-ALM/fix/PDS-116-createResource
Browse files Browse the repository at this point in the history
[PDS-116/fix] 장비 및 차량 추가 로직 수정
  • Loading branch information
dangnak2 authored Nov 26, 2023
2 parents c56a0f8 + 463e887 commit 34f9cc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class Car extends BaseEntity {
@Size(max = 30)
private String location;

@NotNull
@Size(max = 255)
private String description;

Expand All @@ -61,8 +60,9 @@ public Car(String name, String manufacturer, String description, String imgKey,
public static Car toDto(CreateProductReq request, User responsibility) {
return Car.builder()
.name(request.getName())
.location(request.getLocation())
.description(request.getDescription())
.manufacturer(request.getManufacturer() == null ? null : request.getManufacturer())
.location(request.getLocation() == null ? null : request.getLocation())
.description(request.getDescription() == null ? null : request.getDescription())
.imgKey((request.getImgKey() == null) ? null : request.getImgKey())
.user(responsibility)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public class Resource extends BaseEntity {
@Size(max = 30)
private String location;

@NotNull
@Size(max = 255)
private String description;

Expand Down Expand Up @@ -72,8 +71,9 @@ public Resource(Long resourceId, String name, String manufacturer, String locati
public static Resource toDto(CreateProductReq request, User responsibility) {
return Resource.builder()
.name(request.getName())
.location(request.getLocation())
.description(request.getDescription())
.manufacturer(request.getManufacturer() == null ? null : request.getDescription())
.location(request.getLocation() == null ? null : request.getDescription())
.description(request.getDescription() == null ? null : request.getDescription())
.imgKey((request.getImgKey() == null) ? null : request.getImgKey())
.user(responsibility)
.build();
Expand Down

0 comments on commit 34f9cc0

Please sign in to comment.