-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor/#22 학생회 회원가입 시 당선 정보가 담긴 사진을 첨부하고 이를 관리자가 승인해야만 회원가입이 되도록 구현 #32
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
Changes from 17 commits
5094fcb
3b6eb63
13fcbf8
0c6739f
d8f6778
f628d13
95e55d6
bfddc06
2bfd2b5
687c944
2367375
5d49fec
8a3d957
1d7dfdf
b76da83
5126e4d
53fb30e
cda307d
49ae65d
811b700
e07bc01
dbd9496
685b4be
1284fa8
e9f06f9
2b698dd
5f71d89
cebfdb1
7e65f62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| package com.campus.campus.domain.council.application.util; | ||
|
|
||
| import org.springframework.stereotype.Component; | ||
|
|
||
| import com.campus.campus.domain.council.domain.entity.CouncilType; | ||
| import com.campus.campus.domain.council.domain.entity.StudentCouncil; | ||
|
|
||
| @Component | ||
| public class CouncilNameGenerator { | ||
| public String buildCouncilName(StudentCouncil studentCouncil) { | ||
| String schoolName = studentCouncil.getSchool() != null ? studentCouncil.getSchool().getSchoolName() : ""; | ||
| CouncilType councilType = studentCouncil.getCouncilType(); | ||
|
|
||
| return switch (councilType) { | ||
| case SCHOOL_COUNCIL -> String.format("%s 총학생회", schoolName).trim(); | ||
| case COLLEGE_COUNCIL -> String.format("%s %s 학생회", schoolName, getCollegeName(studentCouncil)).trim(); | ||
| case MAJOR_COUNCIL -> String.format("%s %s 학생회", schoolName, getMajorName(studentCouncil)).trim(); | ||
| }; | ||
|
Comment on lines
+10
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -type f -name "StudentCouncil.java" | head -5Repository: our-campUS/our-campUS-BE Length of output: 150 🏁 Script executed: cat -n ./src/main/java/com/campus/campus/domain/council/domain/entity/StudentCouncil.javaRepository: our-campUS/our-campUS-BE Length of output: 3225
🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| private String getCollegeName(StudentCouncil studentCouncil) { | ||
| if (studentCouncil.getCollege() == null) { | ||
| return ""; | ||
| } | ||
| return studentCouncil.getCollege().getCollegeName(); | ||
| } | ||
|
|
||
| private String getMajorName(StudentCouncil studentCouncil) { | ||
| if (studentCouncil.getMajor() == null) { | ||
| return ""; | ||
| } | ||
| return studentCouncil.getMajor().getMajorName(); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.campus.campus.domain.manager.application.dto.request; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| public record CouncilApproveOrDenyRequest( | ||
| @NotNull | ||
| @Schema(description = "인증 결과", example = "true") | ||
| boolean certifyResult | ||
| ) { | ||
|
Comment on lines
+6
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
primitive
🔎 제안하는 수정 public record CouncilApproveOrDenyRequest(
@NotNull
@Schema(description = "인증 결과", example = "true")
- boolean certifyResult
+ Boolean certifyResult
) {
}🤖 Prompt for AI Agents |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.campus.campus.domain.manager.application.dto.request; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotBlank; | ||
|
|
||
| public record ManagerLoginRequest( | ||
| @NotBlank | ||
| @Schema(description = "로그인 id", example = "illtathebest1") | ||
| String loginId, | ||
|
|
||
| @NotBlank | ||
| @Schema(description = "로그인 비밀번호", example = "illtathebest") | ||
| String password | ||
| ) { | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package com.campus.campus.domain.manager.application.dto.response; | ||
|
|
||
| import java.time.LocalDateTime; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| public record CertifyRequestCouncilListResponse( | ||
| @Schema(description = "인증 요청한 학생회 id", example = "1") | ||
| Long councilId, | ||
|
|
||
| @Schema(description = "인증 요청한 학생회 이름", example = "가천대학교 총학생회") | ||
| String councilName, | ||
|
|
||
| @Schema(description = "학생회 생성시간(요청시간)", example = "2026-01-05T11:18:52.92955") | ||
| LocalDateTime createdAt | ||
| ) { | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.campus.campus.domain.manager.application.dto.response; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| public record CertifyRequestCouncilResponse( | ||
| @Schema(description = "인증 요청한 학생회 id", example = "1") | ||
| Long councilId, | ||
|
|
||
| @Schema(description = "인증 요청한 학생회 이름", example = "가천대학교 총학생회") | ||
| String councilName, | ||
|
|
||
| @Schema(description = "학생회 당선 인증 사진 url", example = "https://www.example.com.png") | ||
| String electionImageUrl | ||
| ) { | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.