276e94c460
new file: main_dc/yalarba/api_es/internal/models/update_history.go add UpdateHistory model into easysite102.ru
15 lines
405 B
Go
15 lines
405 B
Go
package models
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
"time"
|
|
)
|
|
|
|
type Base struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
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:"-"` // полностью скрываем
|
|
}
|