-
Notifications
You must be signed in to change notification settings - Fork 1
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 #120 from themoment-team/develop
v20240315.0 버전 적용
- Loading branch information
Showing
117 changed files
with
1,476 additions
and
858 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
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
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
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/team/themoment/gsmNetworking/common/domain/BaseIdEntity.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,10 @@ | ||
package team.themoment.gsmNetworking.common.domain | ||
|
||
import javax.persistence.* | ||
|
||
@MappedSuperclass | ||
abstract class BaseIdEntity { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
val id: Long = 0 | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/kotlin/team/themoment/gsmNetworking/common/domain/BaseIdTimestampEntity.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,30 @@ | ||
package team.themoment.gsmNetworking.common.domain | ||
|
||
import org.hibernate.annotations.UpdateTimestamp | ||
import org.springframework.data.annotation.CreatedDate | ||
import org.springframework.data.annotation.LastModifiedDate | ||
import org.springframework.data.jpa.domain.support.AuditingEntityListener | ||
import java.time.LocalDateTime | ||
import javax.persistence.Column | ||
import javax.persistence.EntityListeners | ||
import javax.persistence.MappedSuperclass | ||
|
||
@MappedSuperclass | ||
@EntityListeners(AuditingEntityListener::class) | ||
abstract class BaseIdTimestampEntity : BaseIdEntity() { | ||
@CreatedDate | ||
@Column( | ||
name = "created_at", | ||
nullable = false, | ||
updatable = false, | ||
) | ||
var createdAt: LocalDateTime = LocalDateTime.now() | ||
|
||
@LastModifiedDate | ||
@Column( | ||
name = "updated_at", | ||
nullable = false, | ||
updatable = true, | ||
) | ||
var updatedAt: LocalDateTime = LocalDateTime.now() | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/kotlin/team/themoment/gsmNetworking/common/domain/BaseTimestampEntity.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,29 @@ | ||
package team.themoment.gsmNetworking.common.domain | ||
|
||
import org.springframework.data.annotation.CreatedDate | ||
import org.springframework.data.annotation.LastModifiedDate | ||
import org.springframework.data.jpa.domain.support.AuditingEntityListener | ||
import java.time.LocalDateTime | ||
import javax.persistence.Column | ||
import javax.persistence.EntityListeners | ||
import javax.persistence.MappedSuperclass | ||
|
||
@MappedSuperclass | ||
@EntityListeners(AuditingEntityListener::class) | ||
abstract class BaseTimestampEntity { | ||
@CreatedDate | ||
@Column( | ||
name = "created_at", | ||
nullable = false, | ||
updatable = false, | ||
) | ||
var createdAt: LocalDateTime = LocalDateTime.now() | ||
|
||
@LastModifiedDate | ||
@Column( | ||
name = "updated_at", | ||
nullable = false, | ||
updatable = true, | ||
) | ||
var updatedAt: LocalDateTime = LocalDateTime.now() | ||
} |
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
19 changes: 14 additions & 5 deletions
19
src/main/kotlin/team/themoment/gsmNetworking/common/socket/message/MessageCode.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
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
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
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
21 changes: 21 additions & 0 deletions
21
...n/kotlin/team/themoment/gsmNetworking/domain/gwangya/controller/GwangyaTokenController.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,21 @@ | ||
package team.themoment.gsmNetworking.domain.gwangya.controller | ||
|
||
import org.springframework.http.ResponseEntity | ||
import org.springframework.web.bind.annotation.GetMapping | ||
import org.springframework.web.bind.annotation.RequestMapping | ||
import org.springframework.web.bind.annotation.RestController | ||
import team.themoment.gsmNetworking.domain.gwangya.dto.GwangyaTokenDto | ||
import team.themoment.gsmNetworking.domain.gwangya.service.QueryGwangyaTokenUseCase | ||
|
||
@RestController | ||
@RequestMapping("api/v1/gwangya/token") | ||
class GwangyaTokenController( | ||
private val queryGwangyaTokenUseCase: QueryGwangyaTokenUseCase | ||
) { | ||
|
||
@GetMapping | ||
fun queryGwangyaToken(): ResponseEntity<GwangyaTokenDto> { | ||
val gwangyaToken = queryGwangyaTokenUseCase.queryGwangyaToken() | ||
return ResponseEntity.ok(gwangyaToken) | ||
} | ||
} |
11 changes: 2 additions & 9 deletions
11
src/main/kotlin/team/themoment/gsmNetworking/domain/gwangya/domain/Gwangya.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 |
---|---|---|
@@ -1,17 +1,10 @@ | ||
package team.themoment.gsmNetworking.domain.gwangya.domain | ||
|
||
import java.time.LocalDateTime | ||
import team.themoment.gsmNetworking.common.domain.BaseIdTimestampEntity | ||
import javax.persistence.* | ||
|
||
@Entity | ||
class Gwangya( | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
val gwangyaId: Long = 0, | ||
|
||
@Column(name = "content", nullable = false, length = 200) | ||
val content: String, | ||
|
||
@Column(name = "created_at", nullable = false) | ||
val createdAt: LocalDateTime | ||
) | ||
) : BaseIdTimestampEntity() |
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
6 changes: 3 additions & 3 deletions
6
.../kotlin/team/themoment/gsmNetworking/domain/gwangya/repository/GwangyaCustomRepository.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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package team.themoment.gsmNetworking.domain.gwangya.repository | ||
|
||
import team.themoment.gsmNetworking.domain.gwangya.dto.GwangyaPostsDto | ||
import team.themoment.gsmNetworking.domain.gwangya.dto.GwangyaPostDto | ||
|
||
interface GwangyaCustomRepository { | ||
|
||
fun findPagebyCursorId(cursorId: Long, pageSize: Long): List<GwangyaPostsDto> | ||
fun findPagebyCursorId(cursorId: Long, pageSize: Long): List<GwangyaPostDto> | ||
|
||
fun findPageWithRecentPosts(pageSize: Long): List<GwangyaPostsDto> | ||
fun findPageWithRecentPosts(pageSize: Long): List<GwangyaPostDto> | ||
} |
Oops, something went wrong.