Add Customer Discovery
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package entity
|
||||
|
||||
type DiscoverySearch struct {
|
||||
Lat float64
|
||||
Long float64
|
||||
Name string
|
||||
Region string
|
||||
Discover string
|
||||
Offset int
|
||||
Limit int
|
||||
Radius int
|
||||
}
|
||||
|
||||
type DiscoverySearchResp struct {
|
||||
ExploreRegions []ExploreRegion `json:"exploreRegions"`
|
||||
ExploreDestinations []ExploreDestination `json:"exploreDestinations"`
|
||||
MustVisit []MustVisit `json:"mustVisit"`
|
||||
}
|
||||
|
||||
type ExploreRegion struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ExploreDestination struct {
|
||||
Name string `json:"name"`
|
||||
ImageURL string `json:"image_url"`
|
||||
}
|
||||
|
||||
type MustVisit struct {
|
||||
SiteID int64 `json:"site_id"`
|
||||
Name string `json:"name"`
|
||||
Location string `json:"location"`
|
||||
Rating float64 `json:"rating"`
|
||||
ReviewCount int `json:"reviewCount"`
|
||||
Price float64 `json:"price"`
|
||||
ImageURL string `json:"imageUrl"`
|
||||
Region string `json:"region"`
|
||||
Regency string `json:"regency"`
|
||||
}
|
||||
@@ -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