4e3cdb8ad9
modified: "main_dc/yalarba/api_yal/internal/models/\320\276bject.go" for eagerloading use references
23 lines
625 B
Go
23 lines
625 B
Go
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"`
|
|
}
|