woowacourse-teams / 2022-ternoko Goto Github PK
View Code? Open in Web Editor NEW면담은 찐하게, 예약은 손쉽게! 올인원 면담 예약 서비스 터놓고 💖
Home Page: https://ternoko.site
면담은 찐하게, 예약은 손쉽게! 올인원 면담 예약 서비스 터놓고 💖
Home Page: https://ternoko.site
코치 메인페이지, 즉 크루들의 면담 예약 상태를 확인할 수 있는 페이지가 존재하지 않는다.
예약 내역 호출시 startTime, endTime을 수정한다.
@DirtiesContext(classMode = ClassMode.BEFORE_EACH_TEST_METHOD)
@ActiveProfiles("test")
public class AcceptanceTest
현재 @activeprofiles("test") 없는 상태에서 인수테스트랑 서비스 테스트 같이 돌리면, 데이터가 남는 에러 발견
그리고 @activeprofiles("test") 로 해결 했지만, 왜 되었는지 모르겠음. 추가 학습 필요
추가로 @DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) 로도 가능
DTO 에서는 빌더패턴, Domain에서는 생성자패턴을 사용하고 있다.
다음 네가지 정책중 한가지를 선택한 뒤, 세부사항을 논의한다.
프로덕션에 coach 데이터가 없다.
coach 데이터를 추가한다.
As-is
DTO 에서는 빌더패턴, Domain에서는 생성자패턴을 사용하고 있다.
To-be
다음 네가지 정책중 한가지를 선택한 뒤, 세부사항을 논의한다.
현재, 크루 입장에서 보여지는 코치 되는시간이 더미 데이터이다.
과거 날짜
, 코치 안되는 시간
, 코치 되는 시간
, 클릭된 상태
에 따른 디자인 적용코치 별 면담 예약을 위해 면담 가능 시간을 저장하는 기능이 필요하다.
면담 신청 페이지에 해당하는 컴포넌트를 구현한다.
final 을 붙이면서 DTO 에 기본 생성자가 없어서 반환값 생성시 맵핑이 안되는 이슈
발견
@Getter
@AllArgsConstructor
public class CoachesResponse {
private final List<CoachResponse> coaches;
}
cannot construct instance of `com.woowacourse.ternoko.dto.CoachesResponse` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class CoachesResponse {
private List<CoachResponse> coaches;
}
dependencies {
// jpa
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// spring-boot
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
// DB
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java'
// lombok
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'org.projectlombok:lombok'
// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.rest-assured:rest-assured:4.4.0'
기존에는 범용적인 Exception 사용하여, 구체적인 에러 내용을 메세지로만 파악했다.
면담 시간 예약을 위해 회원이 필요하다.
추후 슬랙으로 알람 기능까지 도입할 예정이라 Slack social login 을 도입해볼까 ?
면담 예약 기능 필요.
메인 페이지에 해당하는 조각(공통 컴포넌트)를 우선 구현한다.
페어로 나뉘어 작성한 코드에 대해 리팩터링이 필요하다.
@NoArgsConstructor
추가하기@Column(nullable = false, length = 30)
private String crewNickname;
아무것도 없는 상태이당
Reservation 객체의 Interview객체의 필드를 가져오는 경우 getter 메서드 중첩이 일어난다.
코치 별 면담 예약을 위해 면담 가능 시간을 조회하는 기능
이 필요하다.
GET /api/coaches/{coachId}/calendar/times?year={year}&month={month}
폰트, 폰트 사이즈, 컴포넌트 간의 간격, 넓이를 수정한다.
재활용을 하지 못하는 컴포넌트 및 미처하지 못한 리팩토링
면담 예약 목록을 조회하기 위한 기능 필요
query parameter
을 받지 않아 해당 코치에 대한 모든 가능 시간이 조회되는 중입니다.query parameter
로 받아 필터를 걸어 조회해 반환하도록 수정합니다.Interview
도메인의 Item
필드의 필드명이 Item
임item
으로 고친다.면담 예약 상세내역 조회 기능 필요
Controller 에서 DTO 생성하는 로직이 있음
코치가 면담을 만들 때 날짜 선택시 활성화 되는 시간을 어떻게 할지 불분명하다.
findAvailableDateTimesByCoachId
에서 추출되는 되는 시간 중, 예약이 되어서 안되는 시간이 되어도 그대로 리스트가 나간다.
reservationService.create()
에서 면담이 예약되면 되는 시간에서 삭제한다.
MySQL 접근값인 username, password 값을 환경변수로 관리하고 있다.
서브모듈을 도입하여 환경변수가 아닌 실행환경별 설정파일(yml) 단위로 관리하게끔 변경한다.
면담 예약 일시 필드명이 변경 필요
현재 : reservationDate
이유 : Reservation에 대한 정보가 아닌 Interview에 대한 일시 정보
예약 기능을 위해 코치 목록 조회 기능을 구현한다.
프론트 포트 번호와 백엔드 포트 번호가 달라서 나는 CORS 를 해결한다.
coach 데이터를 추가한다.
PUT /api/coaches/{coach_id}/calendar/times HTTP/1.1
Accept: application/json
Host: localhost:8080
{
"calendar" : [
{
"year" : 2022,
"month" : 7,
"times" :
[
"2022-07-07 14:00",
"2022-07-07 15:00",
"2022-07-07 16:00"
]
},
{
"year" : 2022,
"month" : 8,
"times" :
[
"2022-07-08 14:00",
"2022-07-09 14:00",
"2022-07-09 15:00"
]
}
]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.