update:
- pgsql 获取表名, 获取表字段(todo), 获取数据库名 refactor: - 自动化代码与自动化代码历史 代码规范化 - mysql 获取表名, 获取表字段, 获取数据库名 - enter 代码优化
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
package request
|
||||
|
||||
// Paging common input parameter structure
|
||||
// PageInfo Paging common input parameter structure
|
||||
type PageInfo struct {
|
||||
Page int `json:"page" form:"page"` // 页码
|
||||
PageSize int `json:"pageSize" form:"pageSize"` // 每页大小
|
||||
}
|
||||
|
||||
// Find by id structure
|
||||
// GetById Find by id structure
|
||||
type GetById struct {
|
||||
ID float64 `json:"id" form:"id"` // 主键ID
|
||||
}
|
||||
|
||||
func (r *GetById) Uint() uint {
|
||||
return uint(r.ID)
|
||||
}
|
||||
|
||||
type IdsReq struct {
|
||||
Ids []int `json:"ids" form:"ids"`
|
||||
}
|
||||
|
||||
// Get role by id structure
|
||||
// GetAuthorityId Get role by id structure
|
||||
type GetAuthorityId struct {
|
||||
AuthorityId string `json:"authorityId" form:"authorityId"` // 角色ID
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package request
|
||||
|
||||
import "github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
|
||||
type SysAutoHistory struct {
|
||||
request.PageInfo
|
||||
}
|
||||
+6
-16
@@ -1,26 +1,16 @@
|
||||
package request
|
||||
package response
|
||||
|
||||
import "github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
|
||||
type SysAutoHistory struct {
|
||||
request.PageInfo
|
||||
}
|
||||
|
||||
type AutoHistoryByID struct {
|
||||
ID uint `json:"id"`
|
||||
}
|
||||
|
||||
type DBReq struct {
|
||||
type Db struct {
|
||||
Database string `json:"database" gorm:"column:database"`
|
||||
}
|
||||
|
||||
type TableReq struct {
|
||||
TableName string `json:"tableName"`
|
||||
type Table struct {
|
||||
TableName string `json:"tableName" gorm:"column:table_name"`
|
||||
}
|
||||
|
||||
type ColumnReq struct {
|
||||
ColumnName string `json:"columnName" gorm:"column:column_name"`
|
||||
type Column struct {
|
||||
DataType string `json:"dataType" gorm:"column:data_type"`
|
||||
ColumnName string `json:"columnName" gorm:"column:column_name"`
|
||||
DataTypeLong string `json:"dataTypeLong" gorm:"column:data_type_long"`
|
||||
ColumnComment string `json:"columnComment" gorm:"column:column_comment"`
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package response
|
||||
|
||||
import "time"
|
||||
|
||||
type AutoCodeHistory struct {
|
||||
ID uint `json:"ID" gorm:"column:id"`
|
||||
CreatedAt time.Time `json:"CreatedAt" gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `json:"UpdatedAt" gorm:"column:updated_at"`
|
||||
TableName string `json:"tableName" gorm:"column:table_name"`
|
||||
StructName string `json:"structName" gorm:"column:struct_name"`
|
||||
StructCNName string `json:"structCNName" gorm:"column:struct_cn_name"`
|
||||
Flag int `json:"flag" gorm:"column:flag"`
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package system
|
||||
|
||||
import "errors"
|
||||
|
||||
// 初始版本自动化代码工具
|
||||
// AutoCodeStruct 初始版本自动化代码工具
|
||||
type AutoCodeStruct struct {
|
||||
StructName string `json:"structName"` // Struct名称
|
||||
TableName string `json:"tableName"` // 表名
|
||||
|
||||
Reference in New Issue
Block a user