func (p *Package) FindModel(name string) *Model {
	return p.indexedModels[name]
}
FindModel finds the model with the given name.
package generator
import (
	"bytes"
	"fmt"
	"go/types"
	"reflect"
	"strconv"
	"strings"
	"unicode"
)
var reservedKeywords = map[string]struct{}{
	"all":               {},
	"analyse":           {},
	"analyze":           {},
	"and":               {},
	"any":               {},
	"array":             {},
	"as":                {},
	"asc":               {},
	"asymmetric":        {},
	"authorization":     {},
	"binary":            {},
	"both":              {},
	"case":              {},
	"cast":              {},
	"check":             {},
	"collate":           {},
	"collation":         {},
	"columns":           {},
	"concurrently":      {},
	"constraint":        {},
	"create":            {},
	"cross":             {},
	"current_catalog":   {},
	"current_date":      {},
	"current_role":      {},
	"current_schema":    {},
	"current_time":      {},
	"current_timestamp": {},
	"current_user":      {},
	"default":           {},
	"deferrable":        {},
	"desc":              {},
	"distinct":          {},
	"do":                {},
	"end":               {},
	"except":            {},
	"false":             {},
	"fetch":             {},
	"for":               {},
	"foreign":           {},
	"from":              {},
	"grant":             {},
	"group":             {},
	"having":            {},
	"in":                {},
	"index":             {},
	"initially":         {},
	"inner":             {},
	"intersect":         {},
	"into":              {},
	"join":              {},
	"key":               {},
	"lateral":           {},
	"leading":           {},
	"left":              {},
	"like":              {},
	"limit":             {},
	"localtime":         {},
	"localtimestamp":    {},
	"natural":           {},
	"not":               {},
	"null":              {},
	"offset":            {},
	"on":                {},
	"only":              {},
	"or":                {},
	"order":             {},
	"overlaps":          {},
	"placing":           {},
	"primary":           {},
	"references":        {},
	"returning":         {},
	"select":            {},
	"some":              {},
	"symmetric":         {},
	"table":             {},
	"then":              {},
	"to":                {},
	"trailing":          {},
	"true":              {},
	"union":             {},
	"unique":            {},
	"user":              {},
	"using":             {},
	"variadic":          {},
	"verbose":           {},
	"when":              {},
	"where":             {},
	"window":            {},
	"with":              {},
}
var specialTypes = map[string]string{
	"gopkg.in/src-d/go-kallax.v1.UUID":      "kallax.UUID",
	"gopkg.in/src-d/go-kallax.v1.ULID":      "kallax.ULID",
	"gopkg.in/src-d/go-kallax.v1.NumericID": "kallax.NumericID",
	"github.com/satori/go.uuid.UUID":        "kallax.UUID",
	"github.com/gofrs/uuid.UUID":            "kallax.UUID",
	"net/url.URL":                           "url.URL",
	"time.Time":                             "time.Time",
}
var mappings = map[string]string{
	"url.URL": "types.URL",
}
type Package struct {
	pkg *types.Package
	Name string
	Models        []*Model
	indexedModels map[string]*Model
}
func NewPackage(pkg *types.Package) *Package {
	return &Package{
		Name:          pkg.Name(),
		pkg:           pkg,
		indexedModels: make(map[string]*Model),
	}
}
func (p *Package) SetModels(models []*Model) {
	for _, m := range models {
		p.indexedModels[m.Name] = m
	}
	p.Models = models
}