common/model/yclients.go

115 lines
3.9 KiB
Go
Raw Normal View History

package model
import "time"
type YclientsToken struct {
AccountID string `json:"accountID"` // ID аккаунта нас
SalonID int32 `json:"salon_id"` // ID "аккаунта который ГЛАВНЫЙ"
AccessToken string `json:"access_token"`
Active bool `json:"active"`
Expiration bool `json:"expiration"`
CreatedAt time.Time `json:"createdAt"`
}
type YclientsAccount struct {
ID int64 `json:"id"`
AccountID string `json:"accountID"` // ID аккаунта нас
SalonID int32 `json:"salon_id"` // ID "аккаунта который ГЛАВНЫЙ"
Name string `json:"name"`
Country string `json:"country"`
Deleted bool `json:"deleted"`
CreatedAt time.Time `json:"createdAt"`
Stale bool `json:"stale"`
}
type YclientsAccountUser struct {
ID int64 `json:"id"`
SalonID int32 `json:"salon_id"` // ID "аккаунта который ГЛАВНЫЙ"
YclientsUserID int32 `json:"yclientsUserID"`
Name string `json:"name"`
Role int32 `json:"role"`
Deleted bool `json:"deleted"`
CreatedAt time.Time `json:"createdAt"`
}
type UserListYclientsResp struct {
Count int64 `json:"count"`
Items []YclientsAccountUser `json:"items"`
}
type YclientsCompany struct {
ID int64 `json:"id"`
SalonID int32 `json:"salon_id"` // ID "аккаунта который ГЛАВНЫЙ"
Title string `json:"title"`
ShortDecription string `json:"shortDecription"`
Active int32 `json:"active"`
Country string `json:"country"`
GroupPriority int32 `json:"groupPriority"`
Deleted bool `json:"deleted"`
CreatedAt time.Time `json:"createdAt"`
}
type CompanyListYclientsResp struct {
Count int64 `json:"count"`
Items []YclientsCompany `json:"items"`
}
type YclientsServices struct {
ID int64 `json:"id"`
SalonID int32 `json:"salon_id"` // ID "аккаунта который ГЛАВНЫЙ"
ServiceID int32 `json:"serviceID"`
Title string `json:"title"`
CategoryID int32 `json:"categoryID"`
PriceMin string `json:"priceMin"`
PriceMax string `json:"priceMax"`
Discount string `json:"discount"`
Comment string `json:"comment"`
Active string `json:"active"`
ApiID string `json:"apiID"`
Deleted bool `json:"deleted"`
CreatedAt time.Time `json:"createdAt"`
}
type ServicesListYclientsResp struct {
Count int64 `json:"count"`
Items []YclientsServices `json:"items"`
}
type Timeslots struct {
ID int64 `json:"id"`
SalonID int32 `json:"salon_id"` // ID "аккаунта который ГЛАВНЫЙ"
// ниже то что используется в запросе
IsEnabled bool `json:"is_enabled"`
WeekdaysSettings []WeekdaySetting `json:"weekdays_settings"`
DatesSettings DateSetting `json:"dates_settings"`
// выше то что используется в запросе
Deleted bool `json:"deleted"`
CreatedAt time.Time `json:"createdAt"`
}
type WeekdaySetting struct {
Weekday int `json:"weekday"`
Timeslots []int `json:"timeslots"`
Setting GridSetting `json:"setting"`
}
type DateSetting struct {
Date string `json:"date"`
Timeslots []int `json:"timeslots"`
Setting GridSetting `json:"setting"`
}
type GridSetting struct {
GridFirstTimeslot int `json:"grid_first_timeslot"`
GridLastTimeslot int `json:"grid_last_timeslot"`
GridDisplayStep int `json:"grid_display_step"`
GridNearestTimeslotDelay int `json:"grid_nearest_timeslot_delay"`
GridBaseType string `json:"grid_base_type"`
IsGridFlexible bool `json:"is_grid_flexible"`
}
type TimeslotsListYclientsResp struct {
Count int64 `json:"count"`
Items []Timeslots `json:"items"`
}