184 lines
6.9 KiB
Go
184 lines
6.9 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
type YclientsAccount struct {
|
|
ID int64 `json:"id"`
|
|
AccountID string `json:"accountID"` // ID аккаунта нас
|
|
SalonID int32 `json:"salon_id"` // ID "аккаунта который ГЛАВНЫЙ"
|
|
Title string `json:"title"`
|
|
Deleted bool `json:"deleted"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
}
|
|
|
|
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 float64 `json:"priceMin"`
|
|
PriceMax float64 `json:"priceMax"`
|
|
Discount int32 `json:"discount"`
|
|
Comment string `json:"comment"`
|
|
Active bool `json:"active"`
|
|
ApiID string `json:"apiID"`
|
|
Staff []YclientsServiceStaff `json:"staff"`
|
|
Deleted bool `json:"deleted"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
}
|
|
|
|
type YclientsServiceStaff struct {
|
|
ID int `json:"id"`
|
|
SeanceLength int `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"`
|
|
}
|
|
|
|
type YclientsRule struct {
|
|
ID int64 `json:"id"`
|
|
SalonID int32 `json:"salon_id"` // ID "аккаунта который ГЛАВНЫЙ"
|
|
QuizID int32 `json:"quizID"` // ID квиза на которое вешается правило
|
|
StaffID int32 `json:"staffID"`
|
|
Services []ServiceYclientsRule `json:"services"`
|
|
FieldsRule YclientsFieldRule `json:"fields_rule"`
|
|
CustomColor string `json:"custom_color"`
|
|
Deleted bool `json:"deleted"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
}
|
|
|
|
type YclientsFieldRule struct {
|
|
QuestionID map[uint64]int32 `json:"question_id"`
|
|
}
|
|
|
|
type ServiceYclientsRule struct {
|
|
ID int `json:"id"`
|
|
FirstCost int `json:"first_cost"`
|
|
Discount int `json:"discount"`
|
|
Cost float64 `json:"cost"`
|
|
}
|
|
|
|
type YclientsCustomFieldsType string
|
|
|
|
const (
|
|
TypeYclientsText YclientsCustomFieldsType = "text" // строка длиной до 255 символов
|
|
TypeYclientsNumber YclientsCustomFieldsType = "number" // число
|
|
TypeYclientsSelect YclientsCustomFieldsType = "select" // список
|
|
TypeYclientsDate YclientsCustomFieldsType = "date" // Дата (Y-m-d)
|
|
TypeYclientsDateTime YclientsCustomFieldsType = "datetime" // Дата и время (Y-m-d H:i:s)
|
|
)
|
|
|
|
type YclientsField struct {
|
|
ID int64 `json:"id"`
|
|
YclientsID int32 `json:"yclientsID"`
|
|
SalonID int32 `json:"salonID"`
|
|
FieldType YclientsCustomFieldsType `json:"field_type"`
|
|
Code string `json:"code"`
|
|
Title string `json:"title"`
|
|
ShowINUI bool `json:"show_in_ui"`
|
|
UserCanEdit bool `json:"user_can_edit"`
|
|
Deleted bool `json:"deleted"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
}
|
|
|
|
type UserListYclientsFieldsResp struct {
|
|
Count int64 `json:"count"`
|
|
Items []YclientsField `json:"items"`
|
|
}
|
|
|
|
type YclientsUsersTrueResults struct {
|
|
QuizID int64
|
|
AnswerID int64
|
|
Result bool
|
|
QuestionID int64
|
|
Content string
|
|
Session string
|
|
SalonID int32
|
|
UTMs UTMSavingMap
|
|
FieldsRule YclientsFieldRule
|
|
StaffID int32
|
|
Services []ServiceYclientsRule
|
|
CustomColor string
|
|
QuizAccountID string
|
|
Datetime time.Time // время result ответа
|
|
}
|