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