Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Collection struct {
CollName string // 表名
StructName string // 表名的驼峰格式
PbStructName string
ArrStructName string
MongoDaoStructName string // mongo dao 结构的名称
RedisDaoStructName string // redis dao 结构的名称
Derive string
KeyArr []string
DataStructName string
FieldDict map[string]*Field
FieldArr []*Field
SecondaryKey string
CamelSecondaryKey string
CapCamelSecondaryKey string
PrimaryKey string
CamelPrimaryKey string
CapCamelPrimaryKey string
PrimaryKeyField *Field
SecondaryKeyField *Field
IndexDict map[string]*Index
IndexArr []*Index
Capped int64
CommentArr []string
}
func (*Collection) IsCapped ¶
func (coll *Collection) IsCapped() bool
func (*Collection) IsDeriveUser ¶
func (coll *Collection) IsDeriveUser() bool
func (*Collection) IsDeriveUserArr ¶
func (coll *Collection) IsDeriveUserArr() bool
type Database ¶
type Database struct {
Module string
Driver string
ImportArr []string
DbStructName string // 数据库名的驼峰格式
MongoDaoStructName string // mongo 的 dao 结构名字
RedisDaoStructName string // redis 的 dao 结构名字
DbName string
GenBinFilePath string // 生成的文件路径,在 gen/model/{{DbName}}/bin/{{DbName}}.gen.go
GenBinDir string // 生成的文件路径,在 gen/model/{{DbName}}/bin
GenModelDir string // 生成的文件路径,在 gen/model/{{DbName}}
GenModelFilePath string // 生成的文件路径,在 gen/model/{{DbName}}/{{DbName}}.gen.go
GenProtobufFilePath string // 生成的protobuf文件路径, 在gen/{{DbName}}/{{DbName}}.gen.proto
CollectionArr []*Collection // 所有的模型
DaoInterfaceName string
}
type Field ¶
type Field struct {
Tag int
Name string
CamelName string
Type field_type
Array bool
TypeName string
GoTypeName string
ProtobufTypeName string
Default interface{}
CommentArr []string
Coll *Collection
IsPrimaryKey bool /// 是否主键,目前只对userarr类型的表格有效果
IsSecondaryKey bool /// 是否次键,目前只对userarr类型的表格有效果
}
func (*Field) IsComparable ¶
Click to show internal directories.
Click to hide internal directories.