Documentation ¶
Index ¶
- func GenExec(c *gin.Context)
- func GenLogic(ctx context.Context, model ReqModel) error
- func GenerateFile(info map[string]interface{}, model ReqModel)
- func TypeConversion(maps []map[string]interface{}, pkName string, t *TableStruct, model ReqModel) map[string]interface{}
- type ReqModel
- type TableStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateFile ¶
func TypeConversion ¶
func TypeConversion(maps []map[string]interface{}, pkName string, t *TableStruct, model ReqModel) map[string]interface{}
TypeConversion: 字段处理
Types ¶
type ReqModel ¶
type ReqModel struct { Tables string `json:"tables" binding:"required"` Mod string `json:"mod"` // 默认:tuanzicloud.com/cube Api string `json:"api"` // API文件存放路径,默认:apis Model string `json:"model"` // Model文件存放路径,默认:models Logic string `json:"logic"` // Logic文件存放路径: 默认:logics Entity string `json:"entity"` // Entity文件存放路径:默认:entities Module string `json:"module"` // 子模块文件夹,默认:空 Excludes string `json:"excludes"` // modle中不需要的数据库字段:默认:UserPerms,OrgPerms,IsDeleted }
type TableStruct ¶
type TableStruct struct { zorm.EntityStruct TableName string `column:"TABLE_NAME"` //表名 TableComment string `column:"TABLE_COMMENT"` //表注释 }
func (*TableStruct) GetPKColumnName ¶
func (t *TableStruct) GetPKColumnName() string
func (*TableStruct) GetTableName ¶
func (t *TableStruct) GetTableName() string
Click to show internal directories.
Click to hide internal directories.