Skip to content

Commit

Permalink
refactor: CommentsAreaService
Browse files Browse the repository at this point in the history
  • Loading branch information
Handiwork committed Mar 8, 2024
1 parent acd2a76 commit bf5e7c4
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 291 deletions.
4 changes: 4 additions & 0 deletions src/main/kotlin/plus/maa/backend/common/utils/KtExtensions.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package plus.maa.backend.common.utils


inline fun <T> T?.requireNotNull(lazyMessage: () -> Any): T = requireNotNull(this, lazyMessage)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@ import org.hibernate.validator.constraints.Length
* Date 2023-02-17 14:58
*/
data class CommentsAddDTO(
// 评论内容
/**
* 评论内容
*/
@field:Length(min = 1, max = 150, message = "评论内容不可超过150字,请删减")
@field:NotBlank(message = "请填写评论内容")
val message: String,
// 评论的作业id
/**
* 评论所在作业的 id
*/
val copilotId: Long,
// 子评论来源评论id(回复评论)
/**
* 被回复评论的 id
*/
val fromCommentId: String? = null,
/**
* 是否接收通知
*/
val notification: Boolean = true
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ package plus.maa.backend.controller.response.comments
*/
data class CommentsAreaInfo (
val hasNext: Boolean,
/**
* Total number of pages
*/
val page: Int,
/**
* Total number of elements
*/
val total: Long,
val data: List<CommentsInfo>
)
Loading

0 comments on commit bf5e7c4

Please sign in to comment.