Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-go
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-go
Commits
ff5c0fe7
Commit
ff5c0fe7
authored
1 month ago
by
Semyon Krestyaninov
Browse files
Options
Downloads
Patches
Plain Diff
add omitempty tags
parent
4520c8be
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/items/item.go
+5
-5
5 additions, 5 deletions
pkg/items/item.go
with
5 additions
and
5 deletions
pkg/items/item.go
+
5
−
5
View file @
ff5c0fe7
...
@@ -118,11 +118,11 @@ type Item struct {
...
@@ -118,11 +118,11 @@ type Item struct {
// - {"lang":map{...}} - установка перевода для языка
// - {"lang":map{...}} - установка перевода для языка
// - {"lang":map{...}, "*":nil} - установка перевода для языка, сброс остальных переводов
// - {"lang":map{...}, "*":nil} - установка перевода для языка, сброс остальных переводов
// - {"*":nil} - сброс всех переводов
// - {"*":nil} - сброс всех переводов
Translations
map
[
string
]
map
[
string
]
interface
{}
`json:"translations" bson:"translations,omitempty"`
Translations
map
[
string
]
map
[
string
]
interface
{}
`json:"translations
,omitempty
" bson:"translations,omitempty"`
// Список идентификаторов локалей, для которых есть переводы.
// Список идентификаторов локалей, для которых есть переводы.
// Соответствует ключам в translations
// Соответствует ключам в translations
TranslationsIDs
[]
string
`json:"translationsIds" bson:"translations_ids,omitempty"`
TranslationsIDs
[]
string
`json:"translationsIds
,omitempty
" bson:"translations_ids,omitempty"`
RevisionID
string
`json:"revId,omitempty" bson:"revision_id"`
RevisionID
string
`json:"revId,omitempty" bson:"revision_id"`
RevisionDescription
string
`json:"revDescription,omitempty" bson:"revision_description"`
RevisionDescription
string
`json:"revDescription,omitempty" bson:"revision_description"`
...
@@ -131,9 +131,9 @@ type Item struct {
...
@@ -131,9 +131,9 @@ type Item struct {
// Релеватность элемента при полнотекстовом поиске
// Релеватность элемента при полнотекстовом поиске
SearchScore
float64
`json:"searchScore,omitempty" bson:"search_score,omitempty"`
SearchScore
float64
`json:"searchScore,omitempty" bson:"search_score,omitempty"`
Deleted
bool
`json:"deleted" bson:"deleted,omitempty"`
Deleted
bool
`json:"deleted
,omitempty
" bson:"deleted,omitempty"`
Hidden
bool
`json:"hidden" bson:"hidden,omitempty"`
Hidden
bool
`json:"hidden
,omitempty
" bson:"hidden,omitempty"`
Template
bool
`json:"template" bson:"template,omitempty"`
Template
bool
`json:"template
,omitempty
" bson:"template,omitempty"`
}
}
func
NewItem
(
spaceID
,
envID
,
collID
,
id
string
,
data
map
[
string
]
interface
{},
translations
map
[
string
]
map
[
string
]
interface
{})
*
Item
{
func
NewItem
(
spaceID
,
envID
,
collID
,
id
string
,
data
map
[
string
]
interface
{},
translations
map
[
string
]
map
[
string
]
interface
{})
*
Item
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment