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() string
- func (self *EntityDto) ToGoEntityNameEs() string
- func (self *EntityDto) ToGoEntityNameEsCase() 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
BodyDtoVar 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
PkeyField string
PkeyGofield string
PkeyType string
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
GormTag string `json:"gorm_tag"`
EntityGofield
}
func NewEntityField ¶
func NewEntityField(strategyType int, fieldName, fieldType string) *EntityField
func (*EntityField) IfFloat64 ¶
func (self *EntityField) IfFloat64() bool
func (*EntityField) IfInt64 ¶
func (self *EntityField) IfInt64() bool
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) ToGoStruFieldDto ¶
func (self *IndexStrategy) ToGoStruFieldDto() 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) ToGoStruFieldDto ¶
func (self *TableStrategy) ToGoStruFieldDto() string
func (*TableStrategy) ToGoTag ¶
func (self *TableStrategy) ToGoTag() string
func (*TableStrategy) ToGoTagDto ¶
func (self *TableStrategy) ToGoTagDto() string
func (*TableStrategy) ToGoType ¶
func (self *TableStrategy) ToGoType() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.