repo_description: 🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序，使用 Gin 和 Solidjs。
repo_topics: file-server gin golang onedrive solidjs webdav
code: package model
  
  type PageReq struct {
  	Page    int `json:"page" form:"page"`
  	PerPage int `json:"per_page" form:"per_page"`
  }
  
  const MaxUint = ^uint(0)
  const MinUint = 0
  const MaxInt = int(MaxUint >> 1)
  const MinInt = -MaxInt - 1
  
  func (p *PageReq) Validate() {
  	if p.Page < 1 {
  		p.Page = 1
  	}
  	if p.PerPage < 1 {
  		p.PerPage = MaxInt
  	}
  }
  