chore: initial commit
This commit is contained in:
30
internal/model/request/sys_user.go
Normal file
30
internal/model/request/sys_user.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"server/internal/pkg/validator"
|
||||
)
|
||||
|
||||
type CreateSysUserRequest struct {
|
||||
Username string `json:"username" validate:"required"`
|
||||
Account string `json:"account" validate:"required,min=5,max=100"`
|
||||
Password string `json:"password" validate:"required,min=6,max=255"`
|
||||
AvatarID *int32 `json:"avatar_id" validate:"omitempty"`
|
||||
}
|
||||
|
||||
type UpdateSysUserRequest struct {
|
||||
Username *string `json:"username" validate:"omitempty,min=0,max=50"`
|
||||
AvatarID validator.NullInt32 `json:"avatar_id" validate:"omitempty"`
|
||||
}
|
||||
|
||||
type UpdateSysUserPassword struct {
|
||||
Password string `json:"password" validate:"required,min=6,max=255"`
|
||||
}
|
||||
|
||||
type SetSysUserRolesRequest struct {
|
||||
RoleIDs []int32 `json:"role_ids" validate:"required,dive,gt=0"`
|
||||
}
|
||||
|
||||
type LoginRequest struct {
|
||||
Account string `json:"account" validate:"required,min=5,max=100"`
|
||||
Password string `json:"password" validate:"required,min=6,max=255"`
|
||||
}
|
||||
Reference in New Issue
Block a user