modified: main_dc/yalarba/api_yal/internal/models/base.go

modified:   "main_dc/yalarba/api_yal/internal/models/\320\276bject.go"
delete UpdateHistory from base struct
This commit is contained in:
2026-02-11 06:46:16 +05:00
parent 49b9805cbe
commit 9ae4eeb33f
2 changed files with 4 additions and 4 deletions
@@ -10,5 +10,4 @@ type Base struct {
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
UpdateHistories []UpdateHistory `gorm:"polymorphic:Model" json:"-"`
}
@@ -7,11 +7,12 @@ type Object struct {
Base Base `gorm:"embedded"`
// owner account ID
Owner Account `gorm:"foreignKey:OwnerID" json:"owner"`
Owner Account `gorm:"foreignKey:OwnerID" json:"owner"`
AccountID uint `gorm:"not null" json:"account_id"`
// Основная информация
Short_Name string `gorm:"not null" json:"name"`
Long_Name string `json:"long_name"`
ShortName string `gorm:"not null" json:"short_name"`
LongName string `json:"long_name"`
Type string `json:"type"`
Phone string `json:"phone"`
Email string `json:"email"`