dana-medical-site/internal/domain/site.go
2026-10-14 13:33:13 +00:00

43 lines
1.9 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package domain
// Banner — слайд или промо-блок.
//
// Layout: image — готовая картинка (текст нарисован на ней, заголовок необязателен);
// text — заголовок и подзаголовок на цветном фоне; doctor — фото врача, плашка с датой,
// заголовок, имя врача (Subtitle) и плашки-преимущества (Chips). Theme — цвет фона.
type Banner struct {
ID int64 `json:"id"`
Position string `json:"position"`
Layout string `json:"layout"`
Theme string `json:"theme"`
Title string `json:"title,omitempty"`
Subtitle string `json:"subtitle,omitempty"`
Badge string `json:"badge,omitempty"`
Chips []string `json:"chips,omitempty"`
Image string `json:"image,omitempty"`
MobileImage string `json:"mobile_image,omitempty"`
LinkURL string `json:"link_url,omitempty"`
ButtonText string `json:"button_text,omitempty"`
Disclaimer string `json:"disclaimer,omitempty"`
}
// SearchHit — одна находка поиска по сайту.
type SearchHit struct {
Type string `json:"type"` // service | doctor | price | checkup
Title string `json:"title"`
Subtitle string `json:"subtitle,omitempty"`
Path string `json:"path,omitempty"` // для услуги
Slug string `json:"slug,omitempty"` // для врача и чек-апа
Price *float64 `json:"price,omitempty"`
Image string `json:"image,omitempty"`
}
// SearchResult группирует находки по типам — так их показывает выпадающий поиск.
type SearchResult struct {
Query string `json:"query"`
Services []SearchHit `json:"services"`
Doctors []SearchHit `json:"doctors"`
Prices []SearchHit `json:"prices"`
Checkups []SearchHit `json:"checkups"`
}