Add enable field to ToolBase and ToolTemplate

This commit is contained in:
2024-01-19 18:27:34 +08:00
parent cec9a9e07b
commit 3da5260ddd
18 changed files with 90 additions and 29 deletions

View File

@@ -1,15 +1,14 @@
package top.fatweb.oxygen.api.param.tool
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull
data class ToolBaseAddParam(
@field: NotBlank(message = "Name can not be blank")
val name: String?,
@field: NotNull(message = "Source can not be null")
val source: String?,
val source: String = "",
@field:NotNull(message = "Dist can not be null")
val dist: String?
val dist: String = "",
val enable: Boolean = true
)

View File

@@ -10,5 +10,7 @@ data class ToolBaseUpdateParam(
val source: String?,
val dist: String?
val dist: String?,
val enable: Boolean?
)

View File

@@ -19,5 +19,7 @@ data class ToolTemplateAddParam(
val source: String?,
@field:NotNull(message = "Dist can not be null")
val dist: String?
val dist: String?,
val enable: Boolean = true
)

View File

@@ -16,5 +16,7 @@ data class ToolTemplateUpdateParam(
val source: String?,
val dist: String?
val dist: String?,
val enable: Boolean?
)