mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
18 lines
311 B
Go
18 lines
311 B
Go
package entity
|
|
|
|
import "strconv"
|
|
|
|
type Page struct {
|
|
Skip int
|
|
Limit int
|
|
PageNum int
|
|
PageSize int
|
|
}
|
|
|
|
func (p *Page) GetPage(pageNum string, pageSize string) {
|
|
p.PageNum, _ = strconv.Atoi(pageNum)
|
|
p.PageSize, _ = strconv.Atoi(pageSize)
|
|
p.Skip = p.PageSize * (p.PageNum - 1)
|
|
p.Limit = p.PageSize
|
|
}
|