-
Notifications
You must be signed in to change notification settings - Fork 24
고희준 [sprint3] #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "\uACE0\uD76C\uC900-sprint3"
고희준 [sprint3] #78
Conversation
src/main/java/com/sprint/mission/discodeit/DiscodeitApplication.java
Outdated
Show resolved
Hide resolved
src/main/java/com/sprint/mission/discodeit/service/basic/BasicChannelService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/sprint/mission/discodeit/service/basic/BasicChannelService.java
Outdated
Show resolved
Hide resolved
|
||
if (request.content()) { //주강사님이 동적정적 바인딩? 불러오는거 안배웠다고 null로 표기하라고 하셨습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 ㅎㅎ
src/main/java/com/sprint/mission/discodeit/service/basic/BasicUserService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/sprint/mission/discodeit/service/dto/AuthLogin/AuthLoginRequest.java
Outdated
Show resolved
Hide resolved
안녕하세요. 희준님. 희준님이 이렇게 코드를 잘 작성하시는 줄 몰랐네요. 고생하셨고 희준님이 잘해지시고 있는것 같아 저도 뿌듯하네요 ㅎㅎ |
- AuthLoginRequest의 id필드 제거
- Private 채널만 예외 처리하도록 수정
- id 필드 제거 - UserRepository에서 userName으로 user 객체 반환
덕분에 실력이 느네요 ㅎ.ㅎ 칭찬 감사합니다 !! |
고생하셨습니다. 희준님 딱히 더 고칠건 없을 것 같아 머지할게요! |
추가 기능 요구사항
시간 타입 변경하기
새로운 도메인 추가하기
공통: 앞서 정의한 도메인 모델과 동일하게 공통 필드(id, createdAt, updatedAt)를 포함합니다.
ReadStatus
사용자가 채널 별 마지막으로 메시지를 읽은 시간을 표현하는 도메인 모델입니다. 사용자별 각 채널에 읽지 않은 메시지를 확인하기 위해 활용합니다.
UserStatus
사용자 별 마지막으로 확인된 접속 시간을 표현하는 도메인 모델입니다. 사용자의 온라인 상태를 확인하기 위해 활용합니다.
마지막 접속 시간을 기준으로 현재 로그인한 유저로 판단할 수 있는 메소드를 정의하세요.
마지막 접속 시간이 현재 시간으로부터 5분 이내이면 현재 접속 중인 유저로 간주합니다.
BinaryContent
이미지, 파일 등 바이너리 데이터를 표현하는 도메인 모델입니다. 사용자의 프로필 이미지, 메시지에 첨부된 파일을 저장하기 위해 활용합니다.
수정 불가능한 도메인 모델로 간주합니다. 따라서 updatedAt 필드는 정의하지 않습니다.
User, Message 도메인 모델과의 의존 관계 방향성을 잘 고려하여 id 참조 필드를 추가하세요.
각 도메인 모델 별 레포지토리 인터페이스를 선언하세요.
레포지토리 구현체(File, JCF)는 아직 구현하지 마세요. 이어지는 서비스 고도화 요구사항에 따라 레포지토리 인터페이스에 메소드가 추가될 수 있어요.
DTO 활용하기
UserService 고도화
create
유저를 등록하기 위해 필요한 파라미터, 프로필 이미지를 등록하기 위해 필요한 파라미터 등
find, findAll
update
수정 대상 객체의 id 파라미터, 수정할 값 파라미터
delete
BinaryContent(프로필), UserStatus
의존성
AuthService 구현
login
의존성
ChannelService 고도화
create
PRIVATE 채널을 생성할 때:
PUBLIC 채널을 생성할 때에는 기존 로직을 유지합니다.
find
findAll
update
수정 대상 객체의 id 파라미터, 수정할 값 파라미터
delete
Message, ReadStatus
의존성
MessageService 고도화
create
findAll
update
수정 대상 객체의 id 파라미터, 수정할 값 파라미터
delete
첨부파일(BinaryContent)
의존성
ReadStatusService 구현
create
find
findAllByUserId
update
수정 대상 객체의 id 파라미터, 수정할 값 파라미터
delete
의존성
UserStatusService 고도화
create
find
findAll
update
수정 대상 객체의 id 파라미터, 수정할 값 파라미터
updateByUserId
delete
의존성
BinaryContentService 구현
create
find
findAllByIdIn
delete
의존성
새로운 도메인 Repository 구현체 구현
심화 요구사항
Bean 다루기
discodeit.repository.type 설정값에 따라 Repository 구현체가 정해집니다.
값이 jcf 이거나 없으면 JCF*Repository 구현체가 Bean으로 등록되어야 합니다.
값이 file 이면 File*Repository 구현체가 Bean으로 등록되어야 합니다.
File*Repository 구현체의 파일을 저장할 디렉토리 경로를 application.yaml 설정 값을 통해 제어해보세요.
멘토에게
셀프 코드 리뷰를 통해 질문 이어가겠습니다.