2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 19:27:20 +08:00
Files
panel/app/http/requests/website/restore_backup.go
2023-11-11 03:19:06 +08:00

35 lines
808 B
Go

package requests
import (
"github.com/goravel/framework/contracts/http"
"github.com/goravel/framework/contracts/validation"
)
type RestoreBackup struct {
ID uint `form:"id" json:"id" filter:"uint"`
Name string `form:"name" json:"name"`
}
func (r *RestoreBackup) Authorize(ctx http.Context) error {
return nil
}
func (r *RestoreBackup) Rules(ctx http.Context) map[string]string {
return map[string]string{
"id": "required|exists:websites,id",
"name": "required|string",
}
}
func (r *RestoreBackup) Messages(ctx http.Context) map[string]string {
return map[string]string{}
}
func (r *RestoreBackup) Attributes(ctx http.Context) map[string]string {
return map[string]string{}
}
func (r *RestoreBackup) PrepareForValidation(ctx http.Context, data validation.Data) error {
return nil
}