e1735772e1
fix bag with sicle recursive type links
25 lines
660 B
Go
25 lines
660 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"`
|
|
|
|
RatingID uint `json:"rating_id"`
|
|
}
|