Skip to content

Commit

Permalink
AI 요구사항에 맞춰 수정 (#12)
Browse files Browse the repository at this point in the history
* Test: 테스트용 application.yml 파일 추가

* Feat: Dockerfile 작성

* Refactor: AI 요구사항에 맞게 코드 수정

* Fix: H2 관련 설정 삭제

* Refactor: 식당 ID를 반환하도록 추가

* Refactor: AI 요구사항에 맞춰 수정

* Refactor: AI 요구사항에 맞도록 수정
  • Loading branch information
pjh5365 authored Nov 18, 2024
1 parent 670e75a commit 529c471
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public class Restaurant extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "restaurant_id")
private Long id;
@Column(name = "restaurant_name")
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.Builder;
import lombok.Getter;
import workplate.workplateserver.auth.domain.MainExperience;
import workplate.workplateserver.auth.domain.PhysicalStatus;
import workplate.workplateserver.auth.domain.SubExperience;
import workplate.workplateserver.work.domain.entity.Work;

Expand All @@ -21,16 +22,20 @@ public class WorkResponse {
private String workName;
private String workDetail;
private Long workCredit;
private String location;
private MainExperience mainCategory;
private SubExperience subCategory;
private PhysicalStatus physicalStatus;

public static WorkResponse toDto(Work work) {
return WorkResponse.builder()
.workName(work.getWorkName())
.workDetail(work.getWorkDetail())
.workCredit(work.getWorkCredit())
.location(work.getLocation())
.mainCategory(work.getMainCategory())
.subCategory(work.getSubCategory())
.physicalStatus(work.getPhysicalStatus())
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import lombok.Getter;
import lombok.NoArgsConstructor;
import workplate.workplateserver.auth.domain.MainExperience;
import workplate.workplateserver.auth.domain.PhysicalStatus;
import workplate.workplateserver.auth.domain.SubExperience;
import workplate.workplateserver.common.BaseEntity;

Expand All @@ -39,21 +40,27 @@ public class Work extends BaseEntity {
private String workDetail;
@Column(name = "work_credit")
private Long workCredit;
@Column(name = "work_main_category")
private String location;
@Column(name = "main_category")
@Enumerated(EnumType.STRING)
private MainExperience mainCategory;
@Column(name = "work_sub_category")
@Column(name = "sub_category")
@Enumerated(EnumType.STRING)
private SubExperience subCategory;
@Column(name = "physical_status")
@Enumerated(EnumType.STRING)
private PhysicalStatus physicalStatus;

public static Work toEntity(String workName, String workDetail, Long workCredit, MainExperience mainCategory,
SubExperience subCategory) {
public static Work toEntity(String workName, String workDetail, Long workCredit, String location,
MainExperience mainCategory, SubExperience subCategory, PhysicalStatus physicalStatus) {
return Work.builder()
.workName(workName)
.workDetail(workDetail)
.workCredit(workCredit)
.location(location)
.mainCategory(mainCategory)
.subCategory(subCategory)
.physicalStatus(physicalStatus)
.build();
}
}

0 comments on commit 529c471

Please sign in to comment.