Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue509 fix model #527

Merged
merged 1 commit into from
May 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"`
}