func NewTemplatePackage(entities []model.Entity, options Options) TemplatePackage {
	imports := util.NewSet()
	var models []TemplateEntity
	for _, entity := range entities {
		mdl := NewTemplateEntity(entity, options)
		if len(mdl.Columns) == 0 {
			continue
		}
		for _, imp := range mdl.Imports {
			imports.Add(imp)
		}
		models = append(models, mdl)
	}
	return TemplatePackage{
		Package: options.Package,
		HasImports: imports.Len() > 0,
		Imports:    imports.Elements(),
		Entities: models,
	}
}
NewTemplatePackage creates a package for template
package validate
import (
	"fmt"
	"html/template"
	"strings"
	"github.com/dizzyfool/genna/model"
	"github.com/dizzyfool/genna/util"
)
const (
	Nil = "nil"
	Zero = "zero"
	PZero = "pzero"
	Len = "len"
	PLen = "plen"
	Enum = "enum"
	PEnum = "penum"
)
type TemplatePackage struct {
	Package string
	HasImports bool
	Imports    []string
	Entities []TemplateEntity
}