-
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.
Merge pull request #24 from MEOGO-DSM/22-post
🏄 :: (Meogo-22) post
- Loading branch information
Showing
13 changed files
with
64 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package org.meogo.domain.post.domain | ||
|
||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
import javax.persistence.Column | ||
import javax.persistence.Entity | ||
import javax.persistence.GeneratedValue | ||
import javax.persistence.GenerationType | ||
import javax.persistence.Id | ||
|
||
@Entity | ||
class Post( | ||
|
||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Id | ||
val id: Long = 0, | ||
|
||
@Column(nullable = false) | ||
val title: String, | ||
|
||
@Column(nullable = false) | ||
val content: String, | ||
|
||
@Column(name = "user_id", columnDefinition = "BINARY(16)") | ||
val userId: UUID, | ||
|
||
@Column(nullable = false) | ||
var good: Int = 0, | ||
|
||
@Column(nullable = false) | ||
val date: LocalDateTime, | ||
|
||
@Column(name = "school_id") | ||
val schoolId: Int?, | ||
|
||
@Column(name = "key_word") | ||
val keyWord: String? | ||
) { | ||
fun addGood() { | ||
this.good += 1 | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/org/meogo/domain/post/domain/PostRepository.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 org.meogo.domain.post.domain | ||
|
||
import org.springframework.data.repository.Repository | ||
|
||
interface PostRepository : Repository<Post, Long> { | ||
|
||
fun save(post: Post) | ||
|
||
fun findAll(): List<Post> | ||
} |
3 changes: 1 addition & 2 deletions
3
...ain/review/repository/ReviewRepository.kt → .../domain/review/domain/ReviewRepository.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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/org/meogo/domain/review/service/CreateReviewService.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
4 changes: 2 additions & 2 deletions
4
src/main/kotlin/org/meogo/domain/review/service/DeleteReviewService.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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/org/meogo/domain/review/service/ModifyReviewService.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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/org/meogo/domain/review/service/QueryAllBySchoolIdService.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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/org/meogo/domain/review/service/QueryReviewPictureService.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
3 changes: 1 addition & 2 deletions
3
.../domain/user/repository/UserRepository.kt → ...eogo/domain/user/domain/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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/org/meogo/domain/user/service/CheckAccountIdService.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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/org/meogo/domain/user/service/UserSignInService.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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/org/meogo/domain/user/service/UserSignUpService.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