package ii

import (
	"errors"

	"golib/v1/features/mlib/mo"
)

type Item interface {
	GetName() Name
	GetLabel() string
	GetField(name string) (Field, error)
	GetFields() []Field
	GetFieldMap() map[string]Field
	GetFieldsName() []string
}

type Field interface {
	GetName() string
	GetLabel() string
	GetType() mo.Type
	GetModel() Model
	IsIgnore() bool
	GetLookup() (Lookup, bool)
	GetEnums() ([]string, bool)
	GetNumber() (min int64, max int64, ok bool)
	GetDefaultValue() string
}

var (
	ErrItemNotFound = errors.New("item_not_found")
)
