mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-30 04:50:26 +08:00
feat: 新增数据库sql执行记录&执行前原值等信息
This commit is contained in:
22
server/internal/devops/domain/entity/db_sql_exec.go
Normal file
22
server/internal/devops/domain/entity/db_sql_exec.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package entity
|
||||
|
||||
import "mayfly-go/pkg/model"
|
||||
|
||||
// 数据库sql执行记录
|
||||
type DbSqlExec struct {
|
||||
model.Model `orm:"-"`
|
||||
|
||||
DbId uint64 `json:"dbId"`
|
||||
Db string `json:"db"`
|
||||
Table string `json:"table"`
|
||||
Type int8 `json:"type"` // 类型
|
||||
Sql string `json:"sql"` // 执行的sql
|
||||
OldValue string `json:"oldValue"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
const (
|
||||
DbSqlExecTypeUpdate int8 = 1 // 更新类型
|
||||
DbSqlExecTypeDelete int8 = 2 // 删除类型
|
||||
DbSqlExecTypeInsert int8 = 3 // 插入类型
|
||||
)
|
||||
Reference in New Issue
Block a user