93 lines
2.9 KiB
Go
93 lines
2.9 KiB
Go
package models
|
|
|
|
import (
|
|
"gitea.pena/SQuiz/common/model"
|
|
)
|
|
|
|
type GetListFieldsReq struct {
|
|
Page int `json:"page"`
|
|
Limit int `json:"limit"`
|
|
//Filter []string `json:"filter"` // пока не понял что это может быть
|
|
EntityType model.EntityType `json:"entityType"`
|
|
}
|
|
|
|
type ResponseGetListFields struct {
|
|
TotalItems int `json:"_total_items"`
|
|
Page int `json:"_page"`
|
|
PageCount int `json:"_page_count"`
|
|
Links Links `json:"_links"`
|
|
Embedded EmbeddedFields `json:"_embedded"`
|
|
}
|
|
|
|
type Links struct {
|
|
Self SelfLink `json:"self"`
|
|
Next SelfLink `json:"next"`
|
|
Last SelfLink `json:"last"`
|
|
}
|
|
|
|
type EmbeddedFields struct {
|
|
CustomFields []CustomField `json:"custom_fields"`
|
|
}
|
|
|
|
type CustomField struct {
|
|
ID int `json:"id"`
|
|
Name string `json:"name"`
|
|
Sort int `json:"sort"`
|
|
Code string `json:"code"`
|
|
Type string `json:"type"`
|
|
Entity_type string `json:"entity_type"`
|
|
IsComputed bool `json:"is_computed"`
|
|
IsPredefined bool `json:"is_predefined"`
|
|
IsDeletable bool `json:"is_deletable"`
|
|
IsVisible bool `json:"is_visible"`
|
|
IsRequired bool `json:"is_required"`
|
|
Settings []interface{} `json:"settings,omitempty"` // проверить что это (array null)
|
|
Remind *string `json:"remind,omitempty"`
|
|
Currency *string `json:"currency,omitempty"`
|
|
Enums []Enum `json:"enums,omitempty"`
|
|
Nested []Nested `json:"nested,omitempty"`
|
|
IsAPIOnly bool `json:"is_api_only"`
|
|
GroupID *string `json:"group_id,omitempty"`
|
|
RequiredStatuses []RequiredStatus `json:"required_statuses,omitempty"`
|
|
HiddenStatuses []HiddenStatus `json:"hidden_statuses,omitempty"`
|
|
ChainedLists []ChainedList `json:"chained_lists,omitempty"`
|
|
TrackingCallback string `json:"tracking_callback,omitempty"`
|
|
SearchIn *string `json:"search_in,omitempty"`
|
|
Links SelfLink `json:"_links"`
|
|
}
|
|
|
|
type Enum struct {
|
|
ID int `json:"id"`
|
|
Value string `json:"value"`
|
|
Sort int `json:"sort"`
|
|
Code *string `json:"code,omitempty"`
|
|
}
|
|
|
|
type Nested struct {
|
|
ID int `json:"id"`
|
|
ParentID int `json:"parent_id"`
|
|
Value string `json:"value"`
|
|
Sort int `json:"sort"`
|
|
}
|
|
|
|
type RequiredStatus struct {
|
|
StatusID int `json:"status_id"`
|
|
PipelineID int `json:"pipeline_id"`
|
|
}
|
|
|
|
type HiddenStatus struct {
|
|
StatusID int `json:"status_id"`
|
|
PipelineID int `json:"pipeline_id"`
|
|
}
|
|
|
|
type ChainedList struct {
|
|
Title *string `json:"title,omitempty"`
|
|
CatalogID int `json:"catalog_id"`
|
|
ParentCatalogID int `json:"parent_catalog_id"`
|
|
}
|
|
|
|
type AddLeadsFields struct {
|
|
Type model.FieldType `json:"type"`
|
|
Name string `json:"name"`
|
|
}
|