mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-23 11:09:29 +08:00
完成部门管理
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
package xyz.playedu.api.request.backend;
|
||||
|
||||
import jakarta.validation.constraints.Min;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
@@ -13,7 +12,6 @@ import java.io.Serializable;
|
||||
* @Author 杭州白书科技有限公司
|
||||
* @create 2023/2/19 10:42
|
||||
*/
|
||||
@Validated
|
||||
@Data
|
||||
public class DepartmentRequest implements Serializable {
|
||||
@Serial
|
||||
@@ -23,11 +21,11 @@ public class DepartmentRequest implements Serializable {
|
||||
@Length(min = 1, max = 20, message = "部门名称长度在1-20个字符之间")
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "请选择部门上级")
|
||||
@JsonProperty("parent_id")
|
||||
@NotNull(message = "请选择上级部门")
|
||||
private Integer parentId;
|
||||
|
||||
@NotNull(message = "请输入排序值")
|
||||
@Min(value = 0, message = "排序值不能小于0")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user