func NewModel(t *Theme, modelType string) (*Model, error) {
	if t == nil {
		return nil, errors.New("theme is required")
	}
	if modelType == "" {
		return nil, errors.New("model type is required")
	}
	return &Model{
		Theme:     t,
		ID:        t.NextModelSequence(),
		Type:      modelType,
		Templates: make([]string, 0, 1),
		Fields:    make([]*Field, 0, 1),
		Files:     t.Attachments.NewView(),
	}, nil
}
// NewModel creates a new model as a member of the provided theme, and of the
// provided type.
NewModel creates a new model as a member of the provided theme, and of the
provided type.
// NewModel creates a new model as a member of the provided theme and of the // provided type .
func NewModel(t *Theme, modelType string) (*Model, error) {
	if t == nil {
		return nil, errors.New("theme is required")
	}
	if modelType == "" {
		return nil, errors.New("model type is required")
	}
	return &Model{
		Theme:     t,
		ID:        t.NextModelSequence(),
		Type:      modelType,
		Templates: make([]string, 0, 1),
		Fields:    make([]*Field, 0, 1),
		Files:     t.Attachments.NewView(),
	}, nil
}
func NewModel ( t * Theme , modelType string ) ( * Model , error ) { if t == nil { return nil , errors . New ( " " ) } if modelType == " " { return nil , errors . New ( " " ) } return & Model { Theme : t , ID : t . NextModelSequence ( ) , Type : modelType , Templates : make ( [ ] string , 0 , 1 ) , Fields : make ( [ ] * Field , 0 , 1 ) , Files : t . Attachments . NewView ( ) , } , nil }
NewModel creates a new model as a member of the provided theme, and of the
provided type.
NewModel creates a new model as a member of the provided theme and of the provided type .