-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(member): change api request&response data (#89)
* refactor(error): change class name TeamAlreadyExistsException -> TeamExistsException * feat(member): add Member Delete Method & team field & setting team * feat(team): add setting teamLeader method * feat(member): add member delete * test(member): test member delete method * refactor(member): change member api classification * feat(code): add initialize code sql on local envirionment (#87) * feat(codeFixture): add getter methods * feat(sql): add code insert sql to submodule * feat(code): add find code by code_value query & test * refactor(repository): change code setUp method in AbstractRepositoryUnitTest --------- Co-authored-by: KAispread <[email protected]> * feat(valid): add bean validator for create Member RequestDto * test(valid): test bean validator * feat(error): add error messages for validator * refactor(member): refactor CreateMemberRequestDto * feat(code): add query findByCodePk and CodePk static factory method * test(code): test query * refactor(member): create member api refactoring * test(member): test create member service method * test(member): test create member api * test(member): read member detail api test refactoring * refactor(member): change MemberDetailResponseDto specification * refactor(fixture): change MemberDetailResponseDto specification * refactor(member): modify memberService specification * feat(member): add find member with fetch join & test * refactor(member): modify member spec * refactor(member): change member api controller & test * refactor(member): refactor read member service code * test(member): test read member * fix(member): fix compile error * refactor(team): modify data type from Integer to DrinkRate Enum * refactor(member): add Member update method and change nickname length * feat(member): add MBTI exception * refactor(team): remove unnecessary field on team constructor * test(member): test member nickname length validation * test(member): test update member * feat(member): add update member (nickname, mbti) * refactor(member): remove unused dto * style(member): change number controller parameter * refactor(member): change nickname length validation 3 -> 2 * feat(member): add nickname format validation * refactor(validate): change CustomFormatValidator static REGX instance * feat(member): add update value validation logic * feat(member): add bean valid annotation that validate nickname format --------- Co-authored-by: KAispread <[email protected]> Co-authored-by: chaerim <[email protected]>
- Loading branch information
1 parent
3b1578e
commit 4eab177
Showing
54 changed files
with
1,516 additions
and
580 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 19 additions & 5 deletions
24
src/main/java/com/e2i/wemeet/dto/request/member/CollegeInfoRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,30 @@ | ||
package com.e2i.wemeet.dto.request.member; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import com.e2i.wemeet.domain.code.Code; | ||
import com.e2i.wemeet.domain.member.data.CollegeInfo; | ||
import com.e2i.wemeet.domain.member.data.CollegeType; | ||
import com.e2i.wemeet.util.validator.bean.CollegeCodeValid; | ||
import com.e2i.wemeet.util.validator.bean.CollegeTypeValid; | ||
import lombok.Builder; | ||
import org.hibernate.validator.constraints.Length; | ||
|
||
@Builder | ||
public record CollegeInfoRequestDto( | ||
@NotBlank(message = "{not.blank.college}") | ||
String college, | ||
@NotBlank(message = "{not.blank.college.type}") | ||
@CollegeCodeValid | ||
String collegeCode, | ||
|
||
@CollegeTypeValid | ||
String collegeType, | ||
@NotBlank(message = "{not.blank.admission.year}") | ||
|
||
@Length(message = "{length.admissionYear}", min = 2, max = 2) | ||
String admissionYear | ||
) { | ||
|
||
public CollegeInfo toCollegeInfo(Code collegeCode) { | ||
return CollegeInfo.builder() | ||
.collegeCode(collegeCode) | ||
.collegeType(CollegeType.valueOf(this.collegeType)) | ||
.admissionYear(admissionYear) | ||
.build(); | ||
} | ||
} |
Oops, something went wrong.