package models import () type Object struct { /*ID, CreatedAt, UpdatedAt, DeletedAt (Update's history)*/ Base Base `gorm:"embedded"` // owner account ID OwnerID uint `json:"owner_id"` Owner Account `gorm:"foreignKey:OwnerID;references:ID" json:"owner"` // Основная информация 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"` Site string `json:"site"` Description string `json:"description"` Address string `json:"address"` Rating Rating `gorm:"foreigenKey:ObjectID" json:"rating"` }