modified: main_dc/yalarba/api_es/internal/models/base.go
new file: main_dc/yalarba/api_es/internal/models/update_history.go add UpdateHistory model into easysite102.ru
This commit is contained in:
@@ -10,3 +10,5 @@ type Base struct {
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
UpdateHistories []UpdateHistory `gorm:"polymorphic:Model;polymorphicValue:base" json:"-"` // полностью скрываем
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type UpdateHistory struct {
|
||||
ID uint `gorm:"primaryKey" json:"-"`
|
||||
ModelID uint `json:"-"`
|
||||
ModelType string `json:"-"`
|
||||
Timestamp time.Time `json:"-"`
|
||||
UpdatedBy uint `gorm:"index" json:"-"`
|
||||
}
|
||||
Reference in New Issue
Block a user