-
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.
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
src/main/java/io/oeid/mogakgo/domain/achievement/domain/Achievement.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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package io.oeid.mogakgo.domain.achievement.domain; | ||
|
||
import io.oeid.mogakgo.domain.achievement.domain.enums.AchievementType; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@Entity | ||
@Table(name = "achievement_tb") | ||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
public class Achievement { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "id") | ||
private Long id; | ||
|
||
@Column(name = "title") | ||
private String title; | ||
|
||
@Column(name = "description") | ||
private String description; | ||
|
||
@Column(name = "img_url") | ||
private String imgUrl; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "type") | ||
private AchievementType achievementType; | ||
|
||
@Builder | ||
private Achievement(String title, String description, String imgUrl, | ||
AchievementType achievementType) { | ||
this.title = title; | ||
this.description = description; | ||
this.imgUrl = imgUrl; | ||
this.achievementType = achievementType; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/io/oeid/mogakgo/domain/achievement/domain/enums/AchievementType.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package io.oeid.mogakgo.domain.achievement.domain.enums; | ||
|
||
public enum AchievementType { | ||
|
||
} |