func NewWithColumns(cols map[string]interface{}) *Page {
	page := New()
	page.ID = resource.ValidateInt(cols["id"])
	page.CreatedAt = resource.ValidateTime(cols["created_at"])
	page.UpdatedAt = resource.ValidateTime(cols["updated_at"])
	page.Status = resource.ValidateInt(cols["status"])
	page.AuthorID = resource.ValidateInt(cols["author_id"])
	page.Keywords = resource.ValidateString(cols["keywords"])
	page.Name = resource.ValidateString(cols["name"])
	page.Status = resource.ValidateInt(cols["status"])
	page.Summary = resource.ValidateString(cols["summary"])
	page.Template = resource.ValidateString(cols["template"])
	page.Text = resource.ValidateString(cols["text"])
	page.URL = resource.ValidateString(cols["url"])
	return page
}
NewWithColumns creates a new page instance and fills it with data from the database cols provided.
package pages
import (
	"time"
	"github.com/fragmenta/query"
	"github.com/fragmenta/fragmenta-cms/src/lib/resource"
	"github.com/fragmenta/fragmenta-cms/src/lib/status"
)
const (
	TableName = "pages"
	KeyName = "id"
	Order = "name asc, id desc"
)
func AllowedParams() []string {
	return []string{"status", "author_id", "keywords", "name", "status", "summary", "template", "text", "url"}
}