mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 09:15:33 +00:00
IDs: string -> int
This commit is contained in:
@@ -92,11 +92,11 @@ func (a *Agent) SetAnnotation(annotation string) {
|
||||
a.Set(ANNOTATION_FIELD, annotation)
|
||||
}
|
||||
|
||||
func (a *Agent) MusenalmID() string {
|
||||
return a.GetString(MUSENALMID_FIELD)
|
||||
func (a *Agent) MusenalmID() int {
|
||||
return a.GetInt(MUSENALMID_FIELD)
|
||||
}
|
||||
|
||||
func (a *Agent) SetMusenalmID(id string) {
|
||||
func (a *Agent) SetMusenalmID(id int) {
|
||||
a.Set(MUSENALMID_FIELD, id)
|
||||
}
|
||||
|
||||
|
||||
@@ -173,11 +173,11 @@ func (c *Content) SetEntry(entry string) {
|
||||
c.Set(ENTRIES_TABLE, entry)
|
||||
}
|
||||
|
||||
func (c *Content) MusenalmID() string {
|
||||
return c.GetString(MUSENALMID_FIELD)
|
||||
func (c *Content) MusenalmID() int {
|
||||
return c.GetInt(MUSENALMID_FIELD)
|
||||
}
|
||||
|
||||
func (c *Content) SetMusenalmID(musenalmID string) {
|
||||
func (c *Content) SetMusenalmID(musenalmID int) {
|
||||
c.Set(MUSENALMID_FIELD, musenalmID)
|
||||
}
|
||||
|
||||
|
||||
@@ -200,11 +200,11 @@ func (e *Entry) SetDeprecated(deprecated Deprecated) {
|
||||
e.Set(MUSENALM_DEPRECATED_FIELD, deprecated)
|
||||
}
|
||||
|
||||
func (e *Entry) MusenalmID() string {
|
||||
return e.GetString(MUSENALMID_FIELD)
|
||||
func (e *Entry) MusenalmID() int {
|
||||
return e.GetInt(MUSENALMID_FIELD)
|
||||
}
|
||||
|
||||
func (e *Entry) SetMusenalmID(musenalmID string) {
|
||||
func (e *Entry) SetMusenalmID(musenalmID int) {
|
||||
e.Set(MUSENALMID_FIELD, musenalmID)
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,6 @@ func FTS5ValuesContent(content *Content, entry *Entry, agents []*Agent) []string
|
||||
entrystring += "; [o.J.]"
|
||||
}
|
||||
|
||||
strconv.Itoa(entry.Year())
|
||||
return []string{
|
||||
content.PreferredTitle(),
|
||||
content.VariantTitle(),
|
||||
@@ -237,7 +236,7 @@ func FTS5ValuesContent(content *Content, entry *Entry, agents []*Agent) []string
|
||||
strconv.FormatFloat(content.Numbering(), 'f', 3, 64),
|
||||
entrystring,
|
||||
agentstring,
|
||||
content.MusenalmID(),
|
||||
strconv.Itoa(content.MusenalmID()),
|
||||
datatypes.DeleteTags(content.Annotation()),
|
||||
datatypes.DeleteTags(content.Comment()),
|
||||
}
|
||||
@@ -291,7 +290,7 @@ func FTS5ValuesEntry(entry *Entry, places []*Place, agents []*Agent, series []*S
|
||||
placestring,
|
||||
agentstring,
|
||||
seriesstring,
|
||||
entry.MusenalmID(),
|
||||
strconv.Itoa(entry.MusenalmID()),
|
||||
datatypes.DeleteTags(entry.Annotation()),
|
||||
datatypes.DeleteTags(entry.Comment()),
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ func SetCreatedUpdatedFields(fieldlist *core.FieldsList) {
|
||||
}
|
||||
|
||||
func SetMusenalmIDField(fieldlist *core.FieldsList) {
|
||||
fieldlist.Add(&core.TextField{Name: MUSENALMID_FIELD, Max: 64, Required: false})
|
||||
fieldlist.Add(&core.NumberField{Name: MUSENALMID_FIELD, Required: true})
|
||||
}
|
||||
|
||||
func SetEditorStateField(fieldlist *core.FieldsList) {
|
||||
|
||||
@@ -58,11 +58,11 @@ func (p *Place) SetAnnotation(annotation string) {
|
||||
p.Set(ANNOTATION_FIELD, annotation)
|
||||
}
|
||||
|
||||
func (p *Place) MusenalmID() string {
|
||||
return p.GetString(MUSENALMID_FIELD)
|
||||
func (p *Place) MusenalmID() int {
|
||||
return p.GetInt(MUSENALMID_FIELD)
|
||||
}
|
||||
|
||||
func (p *Place) SetMusenalmID(id string) {
|
||||
func (p *Place) SetMusenalmID(id int) {
|
||||
p.Set(MUSENALMID_FIELD, id)
|
||||
}
|
||||
|
||||
|
||||
@@ -56,11 +56,11 @@ func (s *Series) SetAnnotation(annotation string) {
|
||||
s.Set(ANNOTATION_FIELD, annotation)
|
||||
}
|
||||
|
||||
func (s *Series) MusenalmID() string {
|
||||
return s.GetString(MUSENALMID_FIELD)
|
||||
func (s *Series) MusenalmID() int {
|
||||
return s.GetInt(MUSENALMID_FIELD)
|
||||
}
|
||||
|
||||
func (s *Series) SetMusenalmID(id string) {
|
||||
func (s *Series) SetMusenalmID(id int) {
|
||||
s.Set(MUSENALMID_FIELD, id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user