Skip to content

Commit

Permalink
Merge pull request #527 from actiontech/issue_509_fix_model
Browse files Browse the repository at this point in the history
issue509 fix model
  • Loading branch information
sjjian authored May 16, 2022
2 parents 1fecd98 + 3746670 commit 1df71ba
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions sqle/model/sql_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ func (c SqlQueryConfig) Value() (driver.Value, error) {

type SqlQueryHistory struct {
Model
CreateUserId uint `json:"create_user_id" gorm:"not null"`
InstanceId uint `json:"instance_id" gorm:"not null"`
Database string `json:"database"`
RawSql string `json:"raw_sql" gorm:"type:text;not null"`
CreateUserId uint `json:"create_user_id" gorm:"not null"`
InstanceId uint `json:"instance_id" gorm:"not null"`
Database string `json:"database"`
RawSql string `json:"raw_sql" gorm:"type:text;not null"`
ExecSQLs []*SqlQueryExecutionSql `json:"-" gorm:"foreignkey:SqlQueryHistoryId"`
}

type SqlQueryExecutionSql struct {
Model
SqlQueryHistoryId uint `json:"sql_query_history_id" gorm:"not null"`
Sql string `json:"sql" gorm:"type:text;not null"`
ExecStartAt *time.Time `json:"exec_start_at"`
ExecEndAt *time.Time `json:"exec_end_at"`
ExecResult string `json:"exec_result" gorm:"type:text"`
RawSqlInfo SqlQueryHistory `json:"raw_sql_info" gorm:"foreignkey:SqlQueryHistoryId"`
SqlQueryHistoryId uint `json:"sql_query_history_id" gorm:"not null"`
Sql string `json:"sql" gorm:"type:text;not null"`
ExecStartAt *time.Time `json:"exec_start_at"`
ExecEndAt *time.Time `json:"exec_end_at"`
ExecResult string `json:"exec_result" gorm:"type:text"`
}

0 comments on commit 1df71ba

Please sign in to comment.