Feat: all - support multiple platforms

This commit is contained in:
2024-03-18 17:26:08 +08:00
parent 9fe6333aeb
commit cc4e6bd960
39 changed files with 415 additions and 78 deletions

View File

@@ -110,8 +110,8 @@ data class UserAddParam(
*/
@Trim
@Schema(description = "邮箱", required = true, example = "user@email.com")
@NotBlank(message = "Email can not be blank")
@Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$", message = "Illegal email address")
@field:NotBlank(message = "Email can not be blank")
@field:Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$", message = "Illegal email address")
var email: String?,
/**

View File

@@ -112,8 +112,8 @@ data class UserUpdateParam(
*/
@Trim
@Schema(description = "邮箱", required = true, example = "user@email.com")
@NotBlank(message = "Email can not be blank")
@Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$", message = "Illegal email address")
@field:NotBlank(message = "Email can not be blank")
@field:Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$", message = "Illegal email address")
var email: String?,
/**

View File

@@ -2,7 +2,9 @@ package top.fatweb.oxygen.api.param.tool
import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull
import top.fatweb.oxygen.api.annotation.Trim
import top.fatweb.oxygen.api.entity.tool.ToolBase
/**
* Add tool base parameters
@@ -21,5 +23,16 @@ data class ToolBaseAddParam(
@Trim
@Schema(description = "名称", required = true)
@field: NotBlank(message = "Name can not be blank")
var name: String?
var name: String?,
/**
* Platform
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see ToolBase.Platform
*/
@Schema(description = "平台")
@field:NotNull(message = "Platform can not be null")
val platform: ToolBase.Platform?
)

View File

@@ -0,0 +1,27 @@
package top.fatweb.oxygen.api.param.tool
import io.swagger.v3.oas.annotations.media.Schema
import top.fatweb.oxygen.api.param.PageSortParam
/**
* Get tool base parameters
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see PageSortParam
*/
@Schema(description = "获取工具基板请求参数")
data class ToolBaseGetParam(
/**
* Platform
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@Schema(
description = "平台过滤(多个使用逗号分隔)",
allowableValues = ["WEB", "DESKTOP", "ANDROID"],
example = "WEB"
)
val platform: String?
) : PageSortParam()

View File

@@ -62,5 +62,18 @@ data class ToolManagementGetParam(
allowableValues = ["NONE", "PROCESSING", "REJECT", "PASS"],
example = "NONE,PASS"
)
val review: String?
val review: String?,
/**
* Platform
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@Schema(
description = "平台过滤(多个使用逗号分隔)",
allowableValues = ["WEB", "DESKTOP", "ANDROID"],
example = "WEB"
)
val platform: String?
) : PageSortParam()

View File

@@ -0,0 +1,27 @@
package top.fatweb.oxygen.api.param.tool
import io.swagger.v3.oas.annotations.media.Schema
import top.fatweb.oxygen.api.param.PageSortParam
/**
* Get tool template parameters
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see PageSortParam
*/
@Schema(description = "获取工具模板请求参数")
data class ToolTemplateGetParam(
/**
* Platform
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@Schema(
description = "平台过滤(多个使用逗号分隔)",
allowableValues = ["WEB", "DESKTOP", "ANDROID"],
example = "WEB"
)
val platform: String?
) : PageSortParam()

View File

@@ -32,15 +32,6 @@ data class ToolTemplateUpdateParam(
@Schema(description = "名称")
var name: String?,
/**
* Base ID
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@Schema(description = "Base ID")
val baseId: Long?,
/**
* Source
*

View File

@@ -2,8 +2,10 @@ package top.fatweb.oxygen.api.param.tool
import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Pattern
import top.fatweb.oxygen.api.annotation.Trim
import top.fatweb.oxygen.api.entity.tool.ToolBase
/**
* Upgrade tool parameters
@@ -29,6 +31,18 @@ data class ToolUpgradeParam(
)
var toolId: String?,
/**
* Platform
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see ToolBase.Platform
*/
@Schema(description = "平台")
@field:NotNull(message = "Platform can not be null")
val platform: ToolBase.Platform?,
/**
* Version
*