Add Customer Discovery
This commit is contained in:
@@ -25,6 +25,10 @@ type Site struct {
|
||||
CreatedBy int64 `gorm:"type:int;column:created_by"`
|
||||
UpdatedBy int64 `gorm:"type:int;column:updated_by"`
|
||||
Products []Product `gorm:"foreignKey:SiteID;constraint:OnDelete:CASCADE;"`
|
||||
Latitude *float64 `json:"latitude"`
|
||||
Longitude *float64 `json:"longitude"`
|
||||
Region string `json:"region"`
|
||||
Distance float64 `json:"distance"`
|
||||
}
|
||||
|
||||
type SiteSearch struct {
|
||||
@@ -166,3 +170,34 @@ func (e *SiteCountDB) ToSiteCount() *SiteCount {
|
||||
Count: e.Count,
|
||||
}
|
||||
}
|
||||
|
||||
type SiteProductInfo struct {
|
||||
SiteID int64 `json:"site_id"`
|
||||
SiteName string `json:"site_name"`
|
||||
PartnerID int64 `json:"partner_id"`
|
||||
Image string `json:"image"`
|
||||
Address string `json:"address"`
|
||||
LocationLink string `json:"location_link"`
|
||||
Description string `json:"description"`
|
||||
Highlight string `json:"highlight"`
|
||||
ContactPerson string `json:"contact_person"`
|
||||
TnC string `json:"tnc"`
|
||||
AdditionalInfo string `json:"additional_info"`
|
||||
Status string `json:"status"`
|
||||
IsSeasonTicket bool `json:"is_season_ticket"`
|
||||
IsDiscountActive bool `json:"is_discount_active"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Latitude float64 `json:"latitude"`
|
||||
Longitude float64 `json:"longitude"`
|
||||
Distance float64 `json:"distance"` // Calculated field
|
||||
ProductID int64 `json:"product_id"`
|
||||
ProductName string `json:"product_name"`
|
||||
ProductType string `json:"product_type"`
|
||||
ProductPrice float64 `json:"product_price"`
|
||||
IsWeekendTicket bool `json:"is_weekend_ticket"`
|
||||
ProductStatus string `json:"product_status"`
|
||||
ProductDescription string `json:"product_description"`
|
||||
Region string `json:"region"`
|
||||
Regency string `json:"regency"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user