Documentation ¶
Index ¶
- Constants
- func InjectEntityDto(s *EntityDto)
- func LoadEntityDto() baseiface.ISingleton
- type CodeDto
- type EntityDto
- func (self *EntityDto) AppendField(fileldName, fieldType string) *EntityField
- func (self *EntityDto) NewField(fileldName, fieldType string) *EntityField
- func (self *EntityDto) SortByName()
- func (self *EntityDto) SortByType()
- func (self *EntityDto) SortFields()
- func (self *EntityDto) ToGoEntityName(trimPre bool) string
- func (self *EntityDto) ToGoEntityNameEs(trimPre bool) string
- func (self *EntityDto) ToGoEntityNameEsCase(trimPre bool) string
- func (self *EntityDto) Write2File(file string, code string) error
- type EntityField
- type EntityGofield
- type IndexStrategy
- type TableStrategy
Constants ¶
View Source
const ( SortByType = "type" SortByName = "name" )
Variables ¶
This section is empty.
Functions ¶
func InjectEntityDto ¶
func InjectEntityDto(s *EntityDto)
func LoadEntityDto ¶
func LoadEntityDto() baseiface.ISingleton
Types ¶
type CodeDto ¶
type CodeDto struct { FileName string FileVar string DateVar string BodyVar string StruNameVar string FuncVar string // contains filtered or unexported fields }
func (*CodeDto) BodyEntity ¶
func (*CodeDto) FuncEntity ¶
func (*CodeDto) SetBodyEntity ¶
func (*CodeDto) SetFuncEntity ¶
type EntityDto ¶
type EntityDto struct { basedto.BaseEntity EntityName string Fields []*EntityField SortBy string *basedata.DataPath StrategyType int CodeDto }
func NewEntityDto ¶
func NewEntityDto() *EntityDto
func (*EntityDto) AppendField ¶
func (self *EntityDto) AppendField(fileldName, fieldType string) *EntityField
func (*EntityDto) NewField ¶
func (self *EntityDto) NewField(fileldName, fieldType string) *EntityField
func (*EntityDto) SortByName ¶
func (self *EntityDto) SortByName()
func (*EntityDto) SortByType ¶
func (self *EntityDto) SortByType()
func (*EntityDto) SortFields ¶
func (self *EntityDto) SortFields()
func (*EntityDto) ToGoEntityName ¶
func (*EntityDto) ToGoEntityNameEs ¶
func (*EntityDto) ToGoEntityNameEsCase ¶
type EntityField ¶
type EntityField struct { FieldName string `json:"field_name"` FieldType string `json:"field_type"` metaistrategy.MetaIStrategy EntityGofield }
func NewEntityField ¶
func NewEntityField(strategyType int, fieldName, fieldType string) *EntityField
func (*EntityField) SelectStrategy ¶
func (self *EntityField) SelectStrategy(strategy int) *EntityField
func (*EntityField) ToGo ¶
func (self *EntityField) ToGo()
type EntityGofield ¶
func (EntityGofield) SortField ¶
func (self EntityGofield) SortField(sortBy string, that EntityGofield) bool
type IndexStrategy ¶
type IndexStrategy struct {
*EntityField
}
func NewIndexStrategy ¶
func NewIndexStrategy(field *EntityField) *IndexStrategy
func (*IndexStrategy) ToGoStruField ¶
func (self *IndexStrategy) ToGoStruField() string
func (*IndexStrategy) ToGoTag ¶
func (self *IndexStrategy) ToGoTag() string
func (*IndexStrategy) ToGoType ¶
func (self *IndexStrategy) ToGoType() string
type TableStrategy ¶
type TableStrategy struct {
*EntityField
}
func NewTableStrategy ¶
func NewTableStrategy(f *EntityField) *TableStrategy
func (*TableStrategy) ToGoStruField ¶
func (self *TableStrategy) ToGoStruField() string
func (*TableStrategy) ToGoTag ¶
func (self *TableStrategy) ToGoTag() string
func (*TableStrategy) ToGoType ¶
func (self *TableStrategy) ToGoType() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.