-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from dongkyun0713/dongkyun
level domain
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Titto_Backend/src/main/java/com/example/titto_backend/level/domain/Experience.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,22 @@ | ||
package com.example.titto_backend.level.domain; | ||
|
||
import com.example.titto_backend.auth.domain.User; | ||
import jakarta.persistence.*; | ||
|
||
public class Experience { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@OneToOne(mappedBy = "experience") | ||
private User user; | ||
|
||
@Column(name = "total_experience") | ||
private int totalExperience; // μ¬μ©μμ λμ κ²½νμΉ | ||
|
||
@Column(name = "current_experience") | ||
private int currentExperience; // μ¬μ©μμ νμ¬ κ²½νμΉ | ||
|
||
@Column(name = "required_experience") | ||
private int requiredExperience; | ||
} |
21 changes: 21 additions & 0 deletions
21
Titto_Backend/src/main/java/com/example/titto_backend/level/domain/Level.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,21 @@ | ||
package com.example.titto_backend.level.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Level { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "level_type", unique = true) | ||
private LevelType levelType; | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
Titto_Backend/src/main/java/com/example/titto_backend/level/domain/LevelType.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 com.example.titto_backend.level.domain; | ||
|
||
public enum LevelType { | ||
LEVEL1, LEVEL2, LEVEL3, LEVEL4, LEVEL5 | ||
} |