Documentation
¶
Index ¶
Constants ¶
View Source
const ( FlagUrl = "url" FlagPort = "port" FlagType = "dbType" )
Variables ¶
This section is empty.
Functions ¶
func CodeHandler ¶
Types ¶
type ColumnMapper ¶
type ColumnMapper struct {
Name string
MapperName string
ZhName string
Type string
Comment string
IsKey bool
IsAuto bool
SearchType string
Tag template.HTML
}
func (ColumnMapper) ColumnTag ¶
func (c ColumnMapper) ColumnTag() template.HTML
type MysqlQuery ¶
type MysqlQuery struct {
// contains filtered or unexported fields
}
func (*MysqlQuery) TableColumn ¶
func (m *MysqlQuery) TableColumn(table string) ([]Column, error)
func (*MysqlQuery) Tables ¶
func (m *MysqlQuery) Tables() ([]Table, error)
type PreviewField ¶
type PreviewField struct {
FieldName string `json:"field_name,omitempty"` //字段名
FieldZhName string `json:"field_zh_name,omitempty"` //字段中文名
FieldComment string `json:"field_comment,omitempty"` //字段备注
FieldType string `json:"field_type,omitempty"` //字段类型
FieldJson string `json:"field_json,omitempty"` //jsonTag
Show bool `json:"show"` //是否显示
Require bool `json:"require,omitempty"` //是否必填(编辑)
SearchType string `json:"search_type,omitempty"` //搜索条件(=,like,between)
IsKey bool `json:"is_key"` //是否主键
IsAuto bool `json:"is_auto"` //是否自增
}
type PreviewReq ¶
type PreviewReq struct {
TableName string `json:"table_name,omitempty"` //表名
StructName string `json:"struct_name,omitempty"` //实体名称
FileName string `json:"file_name,omitempty"` //文件名称
Comment string `json:"comment"` //表注释
Module string `json:"module,omitempty"` //模块(具体为创建一级目录)
Fields []PreviewField `json:"fields,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.