refactor: shorten model and table prefixes
This commit is contained in:
@@ -2,7 +2,7 @@ package models
|
||||
|
||||
import "time"
|
||||
|
||||
type SenlinAgentTask struct {
|
||||
type SaTask struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Identity string `gorm:"type:char(36);uniqueIndex"`
|
||||
ProjectID uint `gorm:"index;not null"`
|
||||
@@ -24,6 +24,6 @@ type SenlinAgentTask struct {
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func (SenlinAgentTask) TableName() string {
|
||||
return "senlin_agent_tasks"
|
||||
func (SaTask) TableName() string {
|
||||
return "sa_tasks"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user