package sql_executor import ( "git.sxidc.com/go-framework/baize/framework/core/domain" "git.sxidc.com/go-framework/baize/framework/core/domain/value_object" "time" ) const ( FieldSql = "Sql" FieldExecutorID = "ExecutorID" FieldExecutorName = "ExecutorName" FieldExecutedTime = "ExecutedTime" ) var ( ColumnSql = domain.ColumnName(FieldSql) ColumnExecutorID = domain.ColumnName(FieldExecutorID) ColumnExecutorName = domain.ColumnName(FieldExecutorName) ColumnExecutedTime = domain.ColumnName(FieldExecutedTime) ) var fieldMap = map[string]string{ FieldSql: "SQL语句", FieldExecutorID: "执行者ID", FieldExecutorName: "执行者姓名", FieldExecutedTime: "执行时间", } type SqlExecuteLog struct { value_object.Base Sql string `sqlmapping:"column:sql;" sqlresult:"column:sql;" check:"required,when=create"` ExecutorID string `sqlmapping:"column:executor_id;" sqlresult:"column:executor_id;" check:"required,len=32,when=create"` ExecutorName string `sqlmapping:"column:executor_name;" sqlresult:"column:executor_name;" check:"required,lte=256,when=create"` ExecutedTime time.Time `sqlmapping:"column:executed_time;" sqlresult:"column:executed_time;"` } func (sqlExecuteLog *SqlExecuteLog) DomainCNName() string { return "SQL日志" } func (sqlExecuteLog *SqlExecuteLog) DomainCamelName() string { return "SqlExecuteLog" } func (sqlExecuteLog *SqlExecuteLog) GetFieldMap() map[string]string { return fieldMap }