package request import ( "server/internal/pkg/validator" ) type CreateSysMenuRequest struct { Name string `json:"name" validate:"required,min=1,max=100"` Path string `json:"path" validate:"required,min=1,max=100"` Type *int16 `json:"type" validate:"required,oneof=0 1 2"` Component *string `json:"component" validate:"omitempty"` Hidden *bool `json:"hidden" validate:"omitempty"` Sort *int32 `json:"sort" validate:"required,min=0"` Status *int16 `json:"status" validate:"required,oneof=0 1"` ParentID *int32 `json:"parent_id" validate:"omitempty,gt=0"` Icon *int32 `json:"icon" validate:"omitempty"` PermissionCode string `json:"permission_code" validate:"required,min=1,max=100"` } type UpdateSysMenuRequest struct { Name *string `json:"name" validate:"omitempty,min=1,max=100"` Path *string `json:"path" validate:"omitempty,min=1,max=100"` Type *int16 `json:"type" validate:"omitempty,oneof=0 1 2"` Component *string `json:"component" validate:"omitempty"` Hidden *bool `json:"hidden" validate:"omitempty"` Sort *int32 `json:"sort" validate:"omitempty,min=0"` Status *int16 `json:"status" validate:"omitempty,oneof=0 1"` ParentID validator.NullInt32 `json:"parent_id" validate:"omitempty"` Icon *int32 `json:"icon" validate:"omitempty"` PermissionCode *string `json:"permission_code" validate:"omitempty,min=1,max=100"` }