Documentation ¶
Index ¶
- Constants
- Variables
- func GetMoudlePath() (pkgPath string)
- func ToLowerFirstLetter(str string) string
- func ToUpperFirstLetter(str string) string
- type Field
- func (f *Field) Component() (c string)
- func (f *Field) Dropdown(kind string, dynamic bool) (ok bool)
- func (f *Field) DropdownLabels(kind string) string
- func (f *Field) DropdownOptions(kind string) string
- func (f *Field) DropdownTranslateOptionMethod() string
- func (f *Field) Tag() (tag string)
- func (f *Field) Type() (t string)
- type IValid
- type Model
- func (m *Model) Ctrl() bool
- func (m *Model) CustomTableName() bool
- func (m *Model) Dropdowns() (fields []Field)
- func (m *Model) EmbeddingBase() bool
- func (m *Model) Gen() error
- func (m *Model) Icon() string
- func (m *Model) Imports() (imports []string)
- func (m *Model) Lazy() bool
- func (m *Model) Purge() bool
- func (m *Model) TableName() string
- func (m *Model) Valid() error
- func (m *Model) Version() string
- type Translate
Constants ¶
View Source
const Version string = "0.0.37"
Variables ¶
View Source
var DROPDOWN_KIND = [4]string{"strings", "ints", "uints", "floats"}
Functions ¶
func GetMoudlePath ¶
func GetMoudlePath() (pkgPath string)
func ToLowerFirstLetter ¶ added in v0.0.10
func ToUpperFirstLetter ¶ added in v0.0.29
Types ¶
type Field ¶
type Field struct { Model *Model `yaml:"-"` Name *struct { Value string `yaml:",omitempty"` Translate `yaml:",inline,omitempty"` } `yaml:",omitempty"` Database *struct { PrimaryKey, Unique, Index bool `yaml:",omitempty"` } `yaml:",omitempty"` View *struct { Base *struct { Readonly, Postonly, Sortable, Asc, Desc, GlobalSearch, Filter, Hidden, Secret, Autowired bool `yaml:",omitempty"` } `yaml:",omitempty"` Uuid, Text, Switch, Password bool `yaml:",omitempty"` Number *struct { ShowButtons, Float, Uint bool `yaml:",omitempty"` Min, Max *int `yaml:",omitempty"` } `yaml:",omitempty"` File *struct { UploadTo string `yaml:",omitempty"` } `yaml:",omitempty"` Dropdown *struct { Option *struct { Dynamic *struct { Strings, Ints, Uints, Floats bool `yaml:",omitempty"` } `yaml:",omitempty"` Strings []struct { Value string `yaml:",omitempty"` Translate `yaml:",inline,omitempty"` } `yaml:",omitempty"` Ints []struct { Value *int `yaml:",omitempty"` Translate `yaml:",inline,omitempty"` } `yaml:",omitempty"` Uints []struct { Value *uint `yaml:",omitempty"` Translate `yaml:",inline,omitempty"` } `yaml:",omitempty"` Floats []struct { Value *float64 `yaml:",omitempty"` Translate `yaml:",inline,omitempty"` } `yaml:",omitempty"` } `yaml:",omitempty"` BelongTo *struct { Package, Name, Field string `yaml:",omitempty"` } `yaml:",omitempty"` HasOne *struct { Package, Name, Field string `yaml:",omitempty"` } `yaml:",omitempty"` } `yaml:",omitempty"` Calendar *struct { ShowTime, ShowIcon bool `yaml:",omitempty"` } `yaml:",omitempty"` Inline *struct { HasOne *struct { Package, Name, Field string `yaml:",omitempty"` } `yaml:",omitempty"` HasMany *struct { Package, Name string `yaml:",omitempty"` } `yaml:",omitempty"` } `yaml:",omitempty"` MultiSelect *struct { Many2Many *struct { Package, Name, Field string `yaml:",omitempty"` } `yaml:"many2many,omitempty"` } `yaml:",omitempty"` } `yaml:",omitempty"` Validator *struct { Required, Email, Alphanum, Alpha bool `yaml:",omitempty"` Min, Max, Len *int `yaml:",omitempty"` } `yaml:",omitempty"` }
func (*Field) DropdownLabels ¶ added in v0.0.29
func (*Field) DropdownOptions ¶ added in v0.0.29
func (*Field) DropdownTranslateOptionMethod ¶ added in v0.0.27
type Model ¶
type Model struct { Package *struct { Value string `yaml:",omitempty"` Translate `yaml:",inline,omitempty"` } `yaml:",omitempty"` Name *struct { Value string `yaml:",omitempty"` Translate `yaml:",inline,omitempty"` } `yaml:",omitempty"` Database *struct { EmbeddingBase, Purge bool `yaml:",omitempty"` TableName string `yaml:",omitempty"` } `yaml:",omitempty"` View *struct { Lazy, Ctrl bool `yaml:",omitempty"` Icon string `yaml:",omitempty"` } `yaml:",omitempty"` Fields []Field `yaml:",omitempty"` }
func (*Model) CustomTableName ¶ added in v0.0.18
func (*Model) EmbeddingBase ¶
Click to show internal directories.
Click to hide internal directories.