增加集成说明

This commit is contained in:
xiangheng
2023-11-27 18:48:00 +08:00
parent a4a72d6044
commit b0446bfd9d
2 changed files with 19 additions and 3 deletions

View File

@@ -7,7 +7,24 @@ import (
"x_admin/admin/{{{ .ModuleName }}}"
)
// 请在 admin/entry.go 目录引入这个函数
/**
集成
1. 导入
- 请先提交git避免文件覆盖!!!
- 下载并解压压缩包后直接复制server、admin文件夹到项目根目录即可
2. 注册路由
请在 admin/entry.go 文件引入{{{ title (toCamelCase .ModuleName) }}}Route注册路由
3. 后台手动添加菜单和按钮
{{{ .ModuleName }}}:add
{{{.ModuleName }}}:edit
{{{.ModuleName }}}:del
{{{.ModuleName }}}:list
{{{.ModuleName }}}:detail
*/
// {{{ title (toCamelCase .ModuleName) }}}Route(rg)
func {{{ title (toCamelCase .ModuleName) }}}Route(rg *gin.RouterGroup) {
db := core.GetDB()

View File

@@ -27,8 +27,7 @@ var SqlConstants = sqlConstants{
//数据库时间类型
ColumnTypeTime: []string{"datetime", "time", "date", "timestamp"},
//数据库数字类型
ColumnTypeNumber: []string{"tinyint", "smallint", "mediumint", "int", "integer", "bit", "bigint",
"float", "double", "decimal"},
ColumnTypeNumber: []string{"tinyint", "smallint", "mediumint", "int", "integer", "bit", "bigint", "float", "double", "decimal"},
//时间日期字段名
ColumnTimeName: []string{"create_time", "update_time", "delete_time", "start_time", "end_time"},
//页面不需要插入字段