go get github.com/Leukocyte-Lab/gorm-paginator
pgntr := paginator.New(page, orders, map[string]string{})
var models []*Model
result := pgntr.GenGormTransaction(dao.DB).Find(&models)
if result.Error != nil {
// TODO: handle error
}
err := pgntr.CountPageTotal(result)
if result.Error != nil {
// TODO: handle error
}
// return models, pgntr.Page