7ae2acfd8c
upgrade feedback.go, add Platform type and score atributs
26 lines
634 B
Go
26 lines
634 B
Go
package models
|
|
|
|
import ()
|
|
|
|
type Feedback struct {
|
|
/*ID, CreatedAt, UpdatedAt, DeletedAt (Update's history)*/
|
|
Base Base `gorm:"embedded"`
|
|
|
|
// owner account ID
|
|
OwnerID uint `gorm:"not null;index" json:"owner_id"`
|
|
Owner Account `gorm:"foreignKey:OwnerID;references:ID" json:"owner,omitempty"`
|
|
|
|
// object IO
|
|
ObjectID uint `gorm:"not null;index" json:"object_id"`
|
|
Object Object `gorm:"foreignKey:ObjectID;references:ID" json:"object,omitempty"`
|
|
|
|
// enterprener / tourist
|
|
Platform PlatformType `json:"platform"`
|
|
|
|
// 1 - 5
|
|
Score int `json:"score"`
|
|
|
|
// Основная информация
|
|
Text string `json:"text"`
|
|
}
|