-
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.
- Loading branch information
1 parent
92a6ae0
commit 434372b
Showing
9 changed files
with
228 additions
and
54 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
12 changes: 12 additions & 0 deletions
12
src/main/java/dongguk/osori/domain/user/dto/PasswordDto.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,12 @@ | ||
package dongguk.osori.domain.user.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class PasswordDto { | ||
private String password; | ||
} |
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
17 changes: 17 additions & 0 deletions
17
src/main/java/dongguk/osori/domain/user/dto/UserProfileEditDto.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,17 @@ | ||
package dongguk.osori.domain.user.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class UserProfileEditDto { | ||
|
||
private String nickname; | ||
private String major; | ||
private int studentNumber; | ||
private String introduce; | ||
|
||
} |
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,55 @@ | ||
package dongguk.osori.domain.user.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@EqualsAndHashCode(onlyExplicitlyIncluded = true) | ||
@Getter | ||
@Entity | ||
@Table(name = "users") | ||
public class User { | ||
|
||
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long userId; | ||
|
||
@Column(nullable = false) | ||
private String nickname; | ||
|
||
@Column(nullable = false) | ||
private String email; | ||
|
||
@Column(nullable = false) | ||
private String password; | ||
|
||
@Column(nullable = true) | ||
private String major; | ||
|
||
@Column(nullable = true) | ||
private int studentNumber; | ||
|
||
@Column(nullable = true) | ||
private String introduce; | ||
private Integer balance; | ||
|
||
|
||
|
||
public void updateNickName(String nickname) { | ||
this.nickname = nickname; | ||
} | ||
public void updateEmail(String email) { this.email = email; } | ||
public void updatePassword(String password) { this.password = password; } | ||
public void updateMajor(String major) { this.major = major; } | ||
public void updateStudentNumber(int studentNumber) { this.studentNumber = studentNumber; } | ||
public void updateIntroduce(String introduce) { this.introduce = introduce; } | ||
public void updateBalance(int amount) { | ||
if (this.balance == null) { | ||
this.balance = 0; | ||
} | ||
this.balance += amount; | ||
} | ||
|
||
|
||
|
||
} |
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