-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
226 additions
and
10 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
31 changes: 31 additions & 0 deletions
31
src/main/java/plus/maa/backend/controller/request/CopilotSetQuery.java
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 plus.maa.backend.controller.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.Max; | ||
import jakarta.validation.constraints.Positive; | ||
import jakarta.validation.constraints.PositiveOrZero; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* @author dragove | ||
* create on 2024-01-06 | ||
*/ | ||
@Getter | ||
@Setter | ||
@Schema(title = "作业集列表查询接口参数") | ||
public class CopilotSetQuery { | ||
|
||
@Positive(message = "页码必须为大于0的数字") | ||
@Schema(title = "页码") | ||
private int page = 1; | ||
|
||
@Schema(title = "单页数据量") | ||
@PositiveOrZero(message = "单页数据量必须为大于等于0的数字") | ||
@Max(value = 50, message = "单页大小不得超过50") | ||
private int limit = 10; | ||
|
||
@Schema(title = "查询关键词") | ||
private String keyword; | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/plus/maa/backend/controller/response/CopilotSetPageRes.java
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 plus.maa.backend.controller.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.experimental.Accessors; | ||
import plus.maa.backend.controller.response.user.CopilotSetListRes; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author dragove | ||
* create on 2024-01-06 | ||
*/ | ||
@Getter | ||
@Setter | ||
@Schema(title = "作业集分页返回数据") | ||
@Accessors(chain = true) | ||
public class CopilotSetPageRes { | ||
|
||
@Schema(title = "是否有下一页") | ||
private boolean hasNext; | ||
@Schema(title = "当前页码") | ||
private int page; | ||
@Schema(title = "总数据量") | ||
private long total; | ||
@Schema(title = "作业集列表") | ||
private List<CopilotSetListRes> data; | ||
|
||
} |
48 changes: 48 additions & 0 deletions
48
src/main/java/plus/maa/backend/controller/response/CopilotSetRes.java
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,48 @@ | ||
package plus.maa.backend.controller.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import plus.maa.backend.service.model.CopilotSetStatus; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
/** | ||
* @author dragove | ||
* create on 2024-01-06 | ||
*/ | ||
@Getter | ||
@Setter | ||
@Schema(title = "作业集响应") | ||
public class CopilotSetRes { | ||
|
||
@Schema(title = "作业集id") | ||
private long id; | ||
|
||
@Schema(title = "作业集名称") | ||
private String name; | ||
|
||
@Schema(title = "额外描述") | ||
private String description; | ||
|
||
@Schema(title = "作业id列表") | ||
private List<Long> copilotIds; | ||
|
||
@Schema(title = "上传者id") | ||
private String creatorId; | ||
|
||
@Schema(title = "上传者昵称") | ||
private String creator; | ||
|
||
@Schema(title = "创建时间") | ||
private LocalDateTime createTime; | ||
|
||
@Schema(title = "更新时间") | ||
private LocalDateTime updateTime; | ||
|
||
@Schema(title = "作业状态", enumAsRef = true) | ||
private CopilotSetStatus status; | ||
|
||
|
||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/plus/maa/backend/controller/response/user/CopilotSetListRes.java
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,39 @@ | ||
package plus.maa.backend.controller.response.user; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
/** | ||
* @author dragove | ||
* create on 2024-01-06 | ||
*/ | ||
@Getter | ||
@Setter | ||
@Schema(title = "作业集响应(列表)") | ||
public class CopilotSetListRes { | ||
|
||
@Schema(title = "作业集id") | ||
private long id; | ||
|
||
@Schema(title = "作业集名称") | ||
private String name; | ||
|
||
@Schema(title = "额外描述") | ||
private String description; | ||
|
||
@Schema(title = "上传者id") | ||
private String creatorId; | ||
|
||
@Schema(title = "上传者昵称") | ||
private String creator; | ||
|
||
@Schema(title = "创建时间") | ||
private LocalDateTime createTime; | ||
|
||
@Schema(title = "更新时间") | ||
private LocalDateTime updateTime; | ||
|
||
} |
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