-
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 #8 from MEOGO-DSM/7-review
🏄 :: (Meogo-7) review
- Loading branch information
Showing
5 changed files
with
51 additions
and
5 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,29 @@ | ||
package org.meogo.domain.review.domain | ||
|
||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
import javax.persistence.Entity | ||
import javax.persistence.GeneratedValue | ||
import javax.persistence.GenerationType | ||
import javax.persistence.Id | ||
|
||
@Entity | ||
class Review( | ||
|
||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Id | ||
val id: Long = 0, | ||
|
||
val date: LocalDateTime, | ||
|
||
val userId: UUID, | ||
|
||
val schoolId: Int, | ||
|
||
val star: Long, | ||
|
||
val content: String, | ||
|
||
val picture: String? | ||
|
||
) |
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/org/meogo/domain/review/presentation/ReviewController.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.review.presentation | ||
|
||
import lombok.RequiredArgsConstructor | ||
import org.springframework.web.bind.annotation.RequestMapping | ||
import org.springframework.web.bind.annotation.RestController | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/review") | ||
class ReviewController() |
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/org/meogo/domain/review/repository/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.meogo.domain.review.repository | ||
|
||
import org.meogo.domain.review.domain.Review | ||
import org.springframework.data.repository.Repository | ||
|
||
interface ReviewRepository : Repository<Review, Long> { | ||
fun save(review: Review): Review | ||
} |
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/user/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