mirror of
https://gitcode.com/flipped-aurora/gin-vue-admin.git
synced 2026-05-18 13:17:54 +00:00
自动化代码可选不使用官方global.Model结构 (#1637)
* 自动化代码可自行选择默认结构 * 调整自动化模板 * 增加自动化模板中对timer的处理
This commit is contained in:
@@ -66,6 +66,7 @@ func (a *autoCodeSqlite) GetColumn(businessDB string, tableName string, dbName s
|
||||
var columnInfos []struct {
|
||||
Name string `gorm:"column:name"`
|
||||
Type string `gorm:"column:type"`
|
||||
Pk int `gorm:"column:pk"`
|
||||
}
|
||||
if businessDB == "" {
|
||||
err = global.GVA_DB.Raw(sql).Scan(&columnInfos).Error
|
||||
@@ -76,6 +77,7 @@ func (a *autoCodeSqlite) GetColumn(businessDB string, tableName string, dbName s
|
||||
entities = append(entities, response.Column{
|
||||
ColumnName: columnInfo.Name,
|
||||
DataType: columnInfo.Type,
|
||||
PrimaryKey: columnInfo.Pk == 1,
|
||||
})
|
||||
}
|
||||
return entities, err
|
||||
|
||||
Reference in New Issue
Block a user