基础架构
This commit is contained in:
44
internal/application/admin/dto/commands/admin_commands.go
Normal file
44
internal/application/admin/dto/commands/admin_commands.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package commands
|
||||
|
||||
// AdminLoginCommand 管理员登录命令
|
||||
type AdminLoginCommand struct {
|
||||
Username string `json:"username" binding:"required"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
}
|
||||
|
||||
// CreateAdminCommand 创建管理员命令
|
||||
type CreateAdminCommand struct {
|
||||
Username string `json:"username" binding:"required"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
Email string `json:"email" binding:"required,email"`
|
||||
Phone string `json:"phone"`
|
||||
RealName string `json:"real_name" binding:"required"`
|
||||
Role string `json:"role" binding:"required"`
|
||||
Permissions []string `json:"permissions"`
|
||||
OperatorID string `json:"-"`
|
||||
}
|
||||
|
||||
// UpdateAdminCommand 更新管理员命令
|
||||
type UpdateAdminCommand struct {
|
||||
AdminID string `json:"-"`
|
||||
Email string `json:"email" binding:"email"`
|
||||
Phone string `json:"phone"`
|
||||
RealName string `json:"real_name"`
|
||||
Role string `json:"role"`
|
||||
IsActive *bool `json:"is_active"`
|
||||
Permissions []string `json:"permissions"`
|
||||
OperatorID string `json:"-"`
|
||||
}
|
||||
|
||||
// ChangeAdminPasswordCommand 修改密码命令
|
||||
type ChangeAdminPasswordCommand struct {
|
||||
AdminID string `json:"-"`
|
||||
OldPassword string `json:"old_password" binding:"required"`
|
||||
NewPassword string `json:"new_password" binding:"required"`
|
||||
}
|
||||
|
||||
// DeleteAdminCommand 删除管理员命令
|
||||
type DeleteAdminCommand struct {
|
||||
AdminID string `json:"-"`
|
||||
OperatorID string `json:"-"`
|
||||
}
|
||||
Reference in New Issue
Block a user