Skip to content

Commit f512c93

Browse files
committed
remove icon field from badge model
1 parent 4e3f9fe commit f512c93

File tree

6 files changed

+5
-33
lines changed

6 files changed

+5
-33
lines changed

apps/jobboard-backend/src/main/java/org/bounswe/jobboardbackend/badge/controller/BadgeController.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ private BadgeResponseDto toBadgeDto(Badge badge) {
9292
return BadgeResponseDto.builder()
9393
.id(badge.getId())
9494
.userId(badge.getUserId())
95+
.badgeType(badge.getBadgeType().name())
9596
.name(badge.getName())
9697
.description(badge.getDescription())
97-
.icon(badge.getIcon())
9898
.criteria(badge.getCriteria())
9999
.earnedAt(badge.getEarnedAt())
100100
.build();
@@ -105,7 +105,6 @@ private BadgeTypeResponseDto toBadgeTypeDto(BadgeType badgeType) {
105105
.type(badgeType.name())
106106
.name(badgeType.getDisplayName())
107107
.description(badgeType.getDescription())
108-
.icon(badgeType.getIcon())
109108
.criteria(badgeType.getCriteria())
110109
.threshold(badgeType.getThreshold())
111110
.build();

apps/jobboard-backend/src/main/java/org/bounswe/jobboardbackend/badge/dto/BadgeResponseDto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
public class BadgeResponseDto {
1414
private Long id;
1515
private Long userId;
16+
private String badgeType;
1617
private String name;
1718
private String description;
18-
private String icon;
1919
private String criteria;
2020
private Instant earnedAt;
2121
}

apps/jobboard-backend/src/main/java/org/bounswe/jobboardbackend/badge/dto/BadgeTypeResponseDto.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ public class BadgeTypeResponseDto {
2727
*/
2828
private String description;
2929

30-
/**
31-
* Badge icon (emoji or URL)
32-
*/
33-
private String icon;
34-
3530
/**
3631
* Human-readable criteria
3732
*/

apps/jobboard-backend/src/main/java/org/bounswe/jobboardbackend/badge/model/Badge.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ public class Badge {
4343
@Column(length = 1000)
4444
private String description;
4545

46-
private String icon;
47-
4846
@Column(length = 255)
4947
private String criteria;
5048

apps/jobboard-backend/src/main/java/org/bounswe/jobboardbackend/badge/model/BadgeType.java

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
/**
66
* Defines all available badge types in the system.
7-
* Each badge has a display name, description, icon (emoji for now, GCS URL later), and criteria.
7+
* Each badge has a display name, description, criteria, and threshold.
8+
* Icons are handled by frontend/mobile.
89
*/
910
@Getter
1011
public enum BadgeType {
@@ -14,14 +15,12 @@ public enum BadgeType {
1415
FIRST_VOICE(
1516
"First Voice",
1617
"Published your first forum post",
17-
"📝",
1818
"Create your first forum post",
1919
1
2020
),
2121
COMMUNITY_PILLAR(
2222
"Community Pillar",
2323
"A foundational voice with 25 posts",
24-
"🏛️",
2524
"Create 25 forum posts",
2625
25
2726
),
@@ -31,14 +30,12 @@ public enum BadgeType {
3130
CONVERSATION_STARTER(
3231
"Conversation Starter",
3332
"Made your first comment",
34-
"💬",
3533
"Comment on a forum post",
3634
1
3735
),
3836
DISCUSSION_DRIVER(
3937
"Discussion Driver",
4038
"Driving discussions with 50 comments",
41-
"🎯",
4239
"Make 50 comments",
4340
50
4441
),
@@ -48,14 +45,12 @@ public enum BadgeType {
4845
HELPFUL(
4946
"Helpful",
5047
"Your comments helped 10 people",
51-
"👍",
5248
"Receive 10 upvotes on your comments",
5349
10
5450
),
5551
VALUABLE_CONTRIBUTOR(
5652
"Valuable Contributor",
5753
"Received 50 upvotes for helpful content",
58-
"⭐",
5954
"Receive 50 upvotes on your comments",
6055
50
6156
),
@@ -65,14 +60,12 @@ public enum BadgeType {
6560
FIRST_LISTING(
6661
"First Listing",
6762
"Posted your first job listing",
68-
"📋",
6963
"Create your first job post",
7064
1
7165
),
7266
HIRING_MACHINE(
7367
"Hiring Machine",
7468
"Posted 15 job listings",
75-
"🏭",
7669
"Create 15 job posts",
7770
15
7871
),
@@ -82,14 +75,12 @@ public enum BadgeType {
8275
FIRST_STEP(
8376
"First Step",
8477
"Submitted your first job application",
85-
"👣",
8678
"Apply to your first job",
8779
1
8880
),
8981
PERSISTENT(
9082
"Persistent",
9183
"Submitted 15 job applications",
92-
"💪",
9384
"Apply to 15 jobs",
9485
15
9586
),
@@ -99,14 +90,12 @@ public enum BadgeType {
9990
HIRED(
10091
"Hired!",
10192
"Got your first job offer",
102-
"🎉",
10393
"Get accepted for a job",
10494
1
10595
),
10696
CAREER_STAR(
10797
"Career Star",
10898
"Received 5 job offers",
109-
"🏆",
11099
"Get accepted for 5 jobs",
111100
5
112101
),
@@ -116,21 +105,18 @@ public enum BadgeType {
116105
GUIDE(
117106
"Guide",
118107
"Created your mentor profile",
119-
"🧭",
120108
"Create a mentor profile",
121109
1
122110
),
123111
FIRST_MENTEE(
124112
"First Mentee",
125113
"Accepted your first mentee",
126-
"🤝",
127114
"Accept your first mentorship request",
128115
1
129116
),
130117
DEDICATED_MENTOR(
131118
"Dedicated Mentor",
132119
"Accepted 5 mentees",
133-
"🎓",
134120
"Accept 5 mentorship requests",
135121
5
136122
),
@@ -140,35 +126,30 @@ public enum BadgeType {
140126
SEEKING_GUIDANCE(
141127
"Seeking Guidance",
142128
"Requested your first mentorship",
143-
"🙋",
144129
"Send your first mentorship request",
145130
1
146131
),
147132
MENTORED(
148133
"Mentored",
149134
"Got accepted by a mentor",
150-
"📚",
151135
"Get accepted by a mentor",
152136
1
153137
),
154138
FEEDBACK_GIVER(
155139
"Feedback Giver",
156140
"Left your first mentor review",
157-
"✍️",
158141
"Review a mentor",
159142
1
160143
);
161144

162145
private final String displayName;
163146
private final String description;
164-
private final String icon;
165147
private final String criteria;
166148
private final int threshold;
167149

168-
BadgeType(String displayName, String description, String icon, String criteria, int threshold) {
150+
BadgeType(String displayName, String description, String criteria, int threshold) {
169151
this.displayName = displayName;
170152
this.description = description;
171-
this.icon = icon;
172153
this.criteria = criteria;
173154
this.threshold = threshold;
174155
}

apps/jobboard-backend/src/main/java/org/bounswe/jobboardbackend/badge/service/BadgeService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public boolean awardBadge(Long userId, BadgeType badgeType) {
6161
.badgeType(badgeType)
6262
.name(badgeType.getDisplayName())
6363
.description(badgeType.getDescription())
64-
.icon(badgeType.getIcon())
6564
.criteria(badgeType.getCriteria())
6665
.build();
6766

0 commit comments

Comments
 (0)