-
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.
feat: 회원 정보 조회 & 수정 api
- Loading branch information
Showing
13 changed files
with
177 additions
and
49 deletions.
There are no files selected for viewing
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
31 changes: 31 additions & 0 deletions
31
src/main/kotlin/kr/hs/dsm/inq/domain/user/persistence/Attendance.kt
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,31 @@ | ||
package kr.hs.dsm.inq.domain.user.persistence | ||
|
||
import java.time.LocalDate | ||
import javax.persistence.* | ||
|
||
@Table(name = "tbl_attendence") | ||
@Entity | ||
class Attendance ( | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
val id: Long, | ||
|
||
@OneToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "user_id", columnDefinition = "BIGINT", nullable = false) | ||
val user: User, | ||
|
||
var monday: Boolean = false, | ||
|
||
var tuesday: Boolean = false, | ||
|
||
var wednesday: Boolean = false, | ||
|
||
var thursday: Boolean = false, | ||
|
||
var friday: Boolean = false, | ||
|
||
var saturday: Boolean = false, | ||
|
||
var sunday: Boolean = false, | ||
) |
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
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/kr/hs/dsm/inq/domain/user/persistence/repository/AttendanceRepository.kt
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,8 @@ | ||
package kr.hs.dsm.inq.domain.user.persistence.repository | ||
|
||
import kr.hs.dsm.inq.domain.user.persistence.Attendance | ||
import org.springframework.data.repository.CrudRepository | ||
|
||
interface AttendanceRepository : CrudRepository<Attendance, Long> { | ||
fun findAllByUserId(userId: Long): List<Attendance>? | ||
} |
3 changes: 2 additions & 1 deletion
3
...domain/user/persistence/UserRepository.kt → .../persistence/repository/UserRepository.kt
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
42 changes: 42 additions & 0 deletions
42
src/main/kotlin/kr/hs/dsm/inq/domain/user/presentation/dto/Requests.kt
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,42 @@ | ||
package kr.hs.dsm.inq.domain.user.presentation.dto | ||
|
||
import javax.validation.constraints.NotBlank | ||
|
||
data class UserSignInRequest( | ||
|
||
@field:NotBlank | ||
val accountId: String, | ||
|
||
@field:NotBlank | ||
val password: String | ||
) | ||
|
||
data class UserSignUpRequest( | ||
|
||
@field:NotBlank | ||
val accountId: String, | ||
|
||
@field:NotBlank | ||
val username: String, | ||
|
||
@field:NotBlank | ||
val password: String, | ||
|
||
@field:NotBlank | ||
val job: String, | ||
|
||
@field:NotBlank | ||
val jobDuration: Int | ||
) | ||
|
||
data class UpdateUserInfoRequest( | ||
|
||
@field:NotBlank | ||
val username: String, | ||
|
||
@field:NotBlank | ||
val job: String, | ||
|
||
@field:NotBlank | ||
val jobDuration: Int | ||
) |
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/kr/hs/dsm/inq/domain/user/presentation/dto/Responses.kt
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,11 @@ | ||
package kr.hs.dsm.inq.domain.user.presentation.dto | ||
|
||
import java.time.LocalDate | ||
|
||
data class UserInfoResponse( | ||
val username: String, | ||
val joinDate: LocalDate, | ||
val coin: Int, | ||
val job: String, | ||
val jobDuration: Int | ||
) |
12 changes: 0 additions & 12 deletions
12
src/main/kotlin/kr/hs/dsm/inq/domain/user/presentation/dto/request/UserSignInRequest.kt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
src/main/kotlin/kr/hs/dsm/inq/domain/user/presentation/dto/request/UserSignUpRequest.kt
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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/kr/hs/dsm/inq/global/security/principle/CustomDetailsService.kt
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