2024-04-17 12:21:06 +00:00
|
|
|
package models
|
2024-04-04 18:02:10 +00:00
|
|
|
|
2024-04-04 18:32:56 +00:00
|
|
|
type RequestGetListUsers struct {
|
|
|
|
Page int
|
|
|
|
Limit int
|
|
|
|
}
|
|
|
|
|
2024-04-04 18:02:10 +00:00
|
|
|
type ResponseGetListUsers struct {
|
2024-04-20 19:02:13 +00:00
|
|
|
TotalItems int `json:"_total_items"`
|
|
|
|
Links LinksSelf `json:"_links"`
|
|
|
|
Embedded EmbeddedGetListUsers `json:"_embedded"`
|
2024-04-04 18:02:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type EmbeddedGetListUsers struct {
|
2024-04-20 19:02:13 +00:00
|
|
|
Users []Users `json:"items"`
|
2024-04-04 18:02:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type SelfLink struct {
|
|
|
|
Href string `json:"href"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type LinksSelf struct {
|
|
|
|
Self SelfLink `json:"self"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Users struct {
|
2024-04-20 19:02:13 +00:00
|
|
|
ID int32 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
UUID string `json:"uuid"`
|
|
|
|
IsConfirmed bool `json:"is_confirmed"`
|
|
|
|
ConfirmLinkSentAt int `json:"confirm_link_sent_at"`
|
|
|
|
Lang string `json:"lang"`
|
|
|
|
FullName string `json:"full_name"`
|
|
|
|
Groups []Groups `json:"groups"`
|
|
|
|
Links SelfLink `json:"_links"`
|
|
|
|
Rights Rights `json:"_embedded"`
|
2024-04-04 18:02:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Rights struct {
|
|
|
|
Leads `json:"leads"`
|
|
|
|
Contacts `json:"contacts"`
|
|
|
|
Companies `json:"companies"`
|
|
|
|
Tasks `json:"tasks"`
|
|
|
|
MailAccess bool `json:"mail_access"`
|
|
|
|
CatalogAccess bool `json:"catalog_access"`
|
|
|
|
StatusRights []StatusRights `json:"status_rights"`
|
|
|
|
IsAdmin bool `json:"is_admin"`
|
|
|
|
IsFree bool `json:"is_free"`
|
|
|
|
IsActive bool `json:"is_active"`
|
2024-04-20 19:02:13 +00:00
|
|
|
GroupID int `json:"group_id,omitempty"`
|
|
|
|
RoleID int `json:"role_id,omitempty"`
|
|
|
|
Role string `json:"role,omitempty"`
|
2024-04-04 18:02:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Leads struct {
|
|
|
|
View string `json:"view"`
|
|
|
|
Edit string `json:"edit"`
|
|
|
|
Add string `json:"add"`
|
|
|
|
Delete string `json:"delete"`
|
|
|
|
Export string `json:"export"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Contacts struct {
|
|
|
|
View string `json:"view"`
|
|
|
|
Edit string `json:"edit"`
|
|
|
|
Add string `json:"add"`
|
|
|
|
Delete string `json:"delete"`
|
|
|
|
Export string `json:"export"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Companies struct {
|
|
|
|
View string `json:"view"`
|
|
|
|
Edit string `json:"edit"`
|
|
|
|
Add string `json:"add"`
|
|
|
|
Delete string `json:"delete"`
|
|
|
|
Export string `json:"export"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Tasks struct {
|
|
|
|
Edit string `json:"edit"`
|
|
|
|
Delete string `json:"delete"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type StatusRights struct {
|
|
|
|
EntityType string `json:"entity_type"`
|
|
|
|
PipelineID int `json:"pipeline_id"`
|
|
|
|
StatusID int `json:"status_id"`
|
|
|
|
Rights RightsGetListUsers `json:"rights"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type RightsGetListUsers struct {
|
|
|
|
View string `json:"view"`
|
|
|
|
Edit string `json:"edit"`
|
|
|
|
Delete string `json:"delete"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Roles struct {
|
|
|
|
ID int `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Links SelfLink `json:"_links"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Groups struct {
|
|
|
|
ID int `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
2024-04-20 12:57:37 +00:00
|
|
|
//type Embedded struct {
|
|
|
|
// Roles []Roles `json:"roles"`
|
|
|
|
// Groups []Groups `json:"groups"`
|
|
|
|
//}
|
|
|
|
|
2024-04-04 18:02:10 +00:00
|
|
|
type Embedded struct {
|
2024-04-20 12:57:37 +00:00
|
|
|
Rights Rights `json:"rights"`
|
2024-04-04 18:02:10 +00:00
|
|
|
}
|