Finish role add and edit

This commit is contained in:
2023-11-13 17:52:08 +08:00
parent 7a9cd158de
commit e681d9d7b7
10 changed files with 208 additions and 38 deletions

View File

@@ -0,0 +1,21 @@
package top.fatweb.api.param.authentication
import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotBlank
data class RoleUpdateParam(
@Schema(description = "角色 ID")
@field:Min(0)
val id: Long,
@Schema(description = "角色名称")
@field:NotBlank(message = "Name can not be blank")
val name: String?,
@Schema(description = "启用", allowableValues = ["true", "false"])
val enable: Boolean? = true,
@Schema(description = "权限 ID 列表")
val powerIds: List<Long>? = null
)