128 lines
5.0 KiB
Go
128 lines
5.0 KiB
Go
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 "аккаунта который ГЛАВНЫЙ"
|
|
Title string `json:"title"`
|
|
ShortDecription string `json:"shortDecription"`
|
|
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 "аккаунта который ГЛАВНЫЙ"
|
|
YclientsID int32 `json:"yclientsID"` // ID пользователя в Yclients
|
|
Name string `json:"name"`
|
|
Specialization string `json:"specialization"`
|
|
IDPosition int32 `json:"idPosition"`
|
|
TitlePosition string `json:"titlePosition"`
|
|
Fired bool `json:"fired"` // Уволен ли сотрудник
|
|
Status bool `json:"status"` //Удален ли сотрудник
|
|
Hidden bool `json:"hidden"` // Скрыт ли сотрудник для онлайн-записи
|
|
YclientsUserID int32 `json:"yclientsUserID"` // ID пользователя в Yclients2
|
|
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"`
|
|
SalonServiceID int32 `json:"salon_service_id"`
|
|
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"`
|
|
Staff []YclientsServiceStaff `json:"staff"`
|
|
Deleted bool `json:"deleted"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
}
|
|
|
|
type YclientsServiceStaff struct {
|
|
ID string `json:"id"`
|
|
SeanceLength string `json:"seance_length"`
|
|
}
|
|
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"`
|
|
}
|