Added DB models

This commit is contained in:
Simon Martens
2025-02-10 16:58:55 +01:00
parent bd59fdc2c2
commit a39ac0d68e
26 changed files with 1301 additions and 251 deletions

111
dbmodels/agent.go Normal file
View File

@@ -0,0 +1,111 @@
package dbmodels
import "github.com/pocketbase/pocketbase/core"
var _ core.RecordProxy = (*Agent)(nil)
type Agent struct {
core.BaseRecordProxy
}
func NewAgent(record *core.Record) *Agent {
i := &Agent{}
i.SetProxyRecord(record)
return i
}
func (a *Agent) TableName() string {
return AGENTS_TABLE
}
func (a *Agent) Name() string {
return a.GetString(AGENTS_NAME_FIELD)
}
func (a *Agent) SetName(name string) {
a.Set(AGENTS_NAME_FIELD, name)
}
func (a *Agent) Fictional() bool {
return a.GetBool(AGENTS_FICTIONAL_FIELD)
}
func (a *Agent) SetFictional(fictional bool) {
a.Set(AGENTS_FICTIONAL_FIELD, fictional)
}
func (a *Agent) CorporateBody() bool {
return a.GetBool(AGENTS_CORP_FIELD)
}
func (a *Agent) SetCorporateBody(corporateBody bool) {
a.Set(AGENTS_CORP_FIELD, corporateBody)
}
func (a *Agent) URI() string {
return a.GetString(URI_FIELD)
}
func (a *Agent) SetURI(uri string) {
a.Set(URI_FIELD, uri)
}
func (a *Agent) BiographicalData() string {
return a.GetString(AGENTS_BIOGRAPHICAL_DATA_FIELD)
}
func (a *Agent) SetBiographicalData(biographicalData string) {
a.Set(AGENTS_BIOGRAPHICAL_DATA_FIELD, biographicalData)
}
func (a *Agent) Profession() string {
return a.GetString(AGENTS_PROFESSION_FIELD)
}
func (a *Agent) SetProfession(profession string) {
a.Set(AGENTS_PROFESSION_FIELD, profession)
}
func (a *Agent) Pseudonyms() string {
return a.GetString(AGENTS_PSEUDONYMS_FIELD)
}
func (a *Agent) SetPseudonyms(pseudonyms string) {
a.Set(AGENTS_PSEUDONYMS_FIELD, pseudonyms)
}
func (a *Agent) References() string {
return a.GetString(REFERENCES_FIELD)
}
func (a *Agent) SetReferences(references string) {
a.Set(REFERENCES_FIELD, references)
}
func (a *Agent) Annotation() string {
return a.GetString(ANNOTATION_FIELD)
}
func (a *Agent) SetAnnotation(annotation string) {
a.Set(ANNOTATION_FIELD, annotation)
}
func (a *Agent) MusenalmID() string {
return a.GetString(MUSENALMID_FIELD)
}
func (a *Agent) SetMusenalmID(id string) {
a.Set(MUSENALMID_FIELD, id)
}
func (a *Agent) EditState() string {
return a.GetString(EDITSTATE_FIELD)
}
func (a *Agent) SetEditState(editState string) {
a.Set(EDITSTATE_FIELD, editState)
}
func (a *Agent) Comment() string {
return a.GetString(COMMENT_FIELD)
}

View File

@@ -1,10 +1,5 @@
package dbmodels
type AnnotatioNotes struct {
Annotation string `json:",omitempty" db:"annotation"`
Notes string `json:",omitempty" db:"edit_comment"`
}
type FieldMetaData struct {
MetaData MetaData `json:",omitempty" db:"edit_fielddata"`
}

203
dbmodels/content.go Normal file
View File

@@ -0,0 +1,203 @@
package dbmodels
import "github.com/pocketbase/pocketbase/core"
var _ core.RecordProxy = (*Content)(nil)
type Content struct {
core.BaseRecordProxy
}
func NewContent(record *core.Record) *Content {
i := &Content{}
i.SetProxyRecord(record)
return i
}
func (c *Content) TableName() string {
return CONTENTS_TABLE
}
func (c *Content) PreferredTitle() string {
return c.GetString(PREFERRED_TITLE_FIELD)
}
func (c *Content) SetPreferredTitle(preferredTitle string) {
c.Set(PREFERRED_TITLE_FIELD, preferredTitle)
}
func (c *Content) VariantTitle() string {
return c.GetString(VARIANT_TITLE_FIELD)
}
func (c *Content) SetVariantTitle(variantTitle string) {
c.Set(VARIANT_TITLE_FIELD, variantTitle)
}
func (c *Content) ParallelTitle() string {
return c.GetString(PARALLEL_TITLE_FIELD)
}
func (c *Content) SetParallelTitle(parallelTitle string) {
c.Set(PARALLEL_TITLE_FIELD, parallelTitle)
}
func (c *Content) TitleStmt() string {
return c.GetString(TITLE_STMT_FIELD)
}
func (c *Content) SetTitleStmt(titleStmt string) {
c.Set(TITLE_STMT_FIELD, titleStmt)
}
func (c *Content) SubtitleStmt() string {
return c.GetString(SUBTITLE_STMT_FIELD)
}
func (c *Content) SetSubtitleStmt(subtitleStmt string) {
c.Set(SUBTITLE_STMT_FIELD, subtitleStmt)
}
func (c *Content) IncipitStmt() string {
return c.GetString(INCIPIT_STMT_FIELD)
}
func (c *Content) SetIncipitStmt(incipitStmt string) {
c.Set(INCIPIT_STMT_FIELD, incipitStmt)
}
func (c *Content) ResponsibilityStmt() string {
return c.GetString(RESPONSIBILITY_STMT_FIELD)
}
func (c *Content) SetResponsibilityStmt(responsibilityStmt string) {
c.Set(RESPONSIBILITY_STMT_FIELD, responsibilityStmt)
}
func (c *Content) PublicationStmt() string {
return c.GetString(PUBLICATION_STMT_FIELD)
}
func (c *Content) SetPublicationStmt(publicationStmt string) {
c.Set(PUBLICATION_STMT_FIELD, publicationStmt)
}
func (c *Content) PlaceStmt() string {
return c.GetString(PLACE_STMT_FIELD)
}
func (c *Content) SetPlaceStmt(placeStmt string) {
c.Set(PLACE_STMT_FIELD, placeStmt)
}
func (c *Content) Year() int {
return c.GetInt(YEAR_FIELD)
}
func (c *Content) SetYear(year int) {
c.Set(YEAR_FIELD, year)
}
func (c *Content) Language() []string {
return c.GetStringSlice(LANGUAGE_FIELD)
}
func (c *Content) SetLanguage(language []string) {
c.Set(LANGUAGE_FIELD, language)
}
func (c *Content) ContentType() []string {
return c.GetStringSlice(CONTENT_TYPE_FIELD)
}
func (c *Content) SetContentType(contentType []string) {
c.Set(CONTENT_TYPE_FIELD, contentType)
}
func (c *Content) Extent() string {
return c.GetString(EXTENT_FIELD)
}
func (c *Content) SetExtent(extent string) {
c.Set(EXTENT_FIELD, extent)
}
func (c *Content) Dimensions() string {
return c.GetString(DIMENSIONS_FIELD)
}
func (c *Content) SetDimensions(dimensions string) {
c.Set(DIMENSIONS_FIELD, dimensions)
}
func (c *Content) MusenalmType() []string {
return c.GetStringSlice(MUSENALM_INHALTE_TYPE_FIELD)
}
func (c *Content) SetMusenalmType(musenalmType []string) {
c.Set(MUSENALM_INHALTE_TYPE_FIELD, musenalmType)
}
func (c *Content) MusenalmPagination() string {
return c.GetString(MUSENALM_PAGINATION_FIELD)
}
func (c *Content) SetMusenalmPagination(musenalmPagination string) {
c.Set(MUSENALM_PAGINATION_FIELD, musenalmPagination)
}
func (c *Content) Scans() []string {
return c.GetStringSlice(SCAN_FIELD)
}
func (c *Content) SetScans(scans []string) {
c.Set(SCAN_FIELD, scans)
}
func (c *Content) Numbering() float64 {
return c.GetFloat(NUMBERING_FIELD)
}
func (c *Content) SetNumbering(numbering float64) {
c.Set(NUMBERING_FIELD, numbering)
}
func (c *Content) Entry() string {
return c.GetString(ENTRIES_TABLE)
}
func (c *Content) SetEntry(entry string) {
c.Set(ENTRIES_TABLE, entry)
}
func (c *Content) MusenalmID() string {
return c.GetString(MUSENALMID_FIELD)
}
func (c *Content) SetMusenalmID(musenalmID string) {
c.Set(MUSENALMID_FIELD, musenalmID)
}
func (c *Content) EditState() string {
return c.GetString(EDITSTATE_FIELD)
}
func (c *Content) SetEditState(editState string) {
c.Set(EDITSTATE_FIELD, editState)
}
func (c *Content) Annotation() string {
return c.GetString(ANNOTATION_FIELD)
}
func (c *Content) SetAnnotation(annotation string) {
c.Set(ANNOTATION_FIELD, annotation)
}
func (c *Content) Comment() string {
return c.GetString(COMMENT_FIELD)
}
func (c *Content) SetComment(comment string) {
c.Set(COMMENT_FIELD, comment)
}

View File

@@ -434,10 +434,11 @@ const (
AGENTS_PROFESSION_FIELD = "profession"
AGENTS_PSEUDONYMS_FIELD = "pseudonyms"
PLACES_NAME_FIELD = "name"
PLACES_FICTIONAL_FIELD = "fictional"
PLACES_NAME_FIELD = "name"
PLACES_FICTIONAL_FIELD = "fictional"
PLACES_PSEUDONYMS_FIELD = "pseudonyms"
SERIES_NAME_FIELD = "name"
SERIES_TITLE_FIELD = "title"
SERIES_PSEUDONYMS_FIELD = "pseudonyms"
SERIES_FREQUENCY_FIELD = "frequency"

233
dbmodels/entry.go Normal file
View File

@@ -0,0 +1,233 @@
package dbmodels
import (
"log/slog"
"github.com/pocketbase/pocketbase/core"
)
var _ core.RecordProxy = (*Entry)(nil)
type Entry struct {
core.BaseRecordProxy
}
func NewEntry(record *core.Record) *Entry {
i := &Entry{}
i.SetProxyRecord(record)
return i
}
func (e *Entry) TableName() string {
return ENTRIES_TABLE
}
func (e *Entry) PreferredTitle() string {
return e.GetString(PREFERRED_TITLE_FIELD)
}
func (e *Entry) SetPreferredTitle(preferredTitle string) {
e.Set(PREFERRED_TITLE_FIELD, preferredTitle)
}
func (e *Entry) VariantTitle() string {
return e.GetString(VARIANT_TITLE_FIELD)
}
func (e *Entry) SetVariantTitle(variantTitle string) {
e.Set(VARIANT_TITLE_FIELD, variantTitle)
}
func (e *Entry) ParallelTitle() string {
return e.GetString(PARALLEL_TITLE_FIELD)
}
func (e *Entry) SetParallelTitle(parallelTitle string) {
e.Set(PARALLEL_TITLE_FIELD, parallelTitle)
}
func (e *Entry) TitleStmt() string {
return e.GetString(TITLE_STMT_FIELD)
}
func (e *Entry) SetTitleStmt(titleStmt string) {
e.Set(TITLE_STMT_FIELD, titleStmt)
}
func (e *Entry) SubtitleStmt() string {
return e.GetString(SUBTITLE_STMT_FIELD)
}
func (e *Entry) SetSubtitleStmt(subtitleStmt string) {
e.Set(SUBTITLE_STMT_FIELD, subtitleStmt)
}
func (e *Entry) IncipitStmt() string {
return e.GetString(INCIPIT_STMT_FIELD)
}
func (e *Entry) SetIncipitStmt(incipitStmt string) {
e.Set(INCIPIT_STMT_FIELD, incipitStmt)
}
func (e *Entry) ResponsibilityStmt() string {
return e.GetString(RESPONSIBILITY_STMT_FIELD)
}
func (e *Entry) SetResponsibilityStmt(responsibilityStmt string) {
e.Set(RESPONSIBILITY_STMT_FIELD, responsibilityStmt)
}
func (e *Entry) PublicationStmt() string {
return e.GetString(PUBLICATION_STMT_FIELD)
}
func (e *Entry) SetPublicationStmt(publicationStmt string) {
e.Set(PUBLICATION_STMT_FIELD, publicationStmt)
}
func (e *Entry) PlaceStmt() string {
return e.GetString(PLACE_STMT_FIELD)
}
func (e *Entry) SetPlaceStmt(placeStmt string) {
e.Set(PLACE_STMT_FIELD, placeStmt)
}
func (e *Entry) Year() int {
return e.GetInt(YEAR_FIELD)
}
func (e *Entry) SetYear(year int) {
e.Set(YEAR_FIELD, year)
}
func (e *Entry) Language() []string {
return e.GetStringSlice(LANGUAGE_FIELD)
}
func (e *Entry) SetLanguage(language []string) {
e.Set(LANGUAGE_FIELD, language)
}
func (e *Entry) ContentType() []string {
return e.GetStringSlice(CONTENT_TYPE_FIELD)
}
func (e *Entry) SetContentType(contentType []string) {
e.Set(CONTENT_TYPE_FIELD, contentType)
}
func (e *Entry) Extent() string {
return e.GetString(EXTENT_FIELD)
}
func (e *Entry) SetExtent(extent string) {
e.Set(EXTENT_FIELD, extent)
}
func (e *Entry) Dimensions() string {
return e.GetString(DIMENSIONS_FIELD)
}
func (e *Entry) SetDimensions(dimensions string) {
e.Set(DIMENSIONS_FIELD, dimensions)
}
func (e *Entry) Edition() string {
return e.GetString(EDITION_FIELD)
}
func (e *Entry) SetEdition(edition string) {
e.Set(EDITION_FIELD, edition)
}
func (e *Entry) MediaType() []string {
return e.GetStringSlice(MEDIA_TYPE_FIELD)
}
func (e *Entry) SetMediaType(mediaType []string) {
e.Set(MEDIA_TYPE_FIELD, mediaType)
}
func (e *Entry) CarrierType() []string {
return e.GetStringSlice(CARRIER_TYPE_FIELD)
}
func (e *Entry) SetCarrierType(carrierType []string) {
e.Set(CARRIER_TYPE_FIELD, carrierType)
}
func (e *Entry) References() string {
return e.GetString(REFERENCES_FIELD)
}
func (e *Entry) SetReferences(references string) {
e.Set(REFERENCES_FIELD, references)
}
func (e *Entry) Places() []string {
return e.GetStringSlice(PLACES_TABLE)
}
func (e *Entry) SetPlaces(places []string) {
e.Set(PLACES_TABLE, places)
}
func (e *Entry) Meta() map[string]MetaData {
md := make(map[string]MetaData)
err := e.UnmarshalJSONField(META_FIELD, &md)
if err != nil {
slog.Error("Error unmarshalling meta field", "error", err)
}
return md
}
func (e *Entry) SetMeta(meta map[string]MetaData) {
e.Set(META_FIELD, meta)
}
func (e *Entry) Deprecated() Deprecated {
d := Deprecated{}
err := e.UnmarshalJSONField(MUSENALM_DEPRECATED_FIELD, &d)
if err != nil {
slog.Error("Error unmarshalling deprecated field", "error", err)
}
return d
}
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) SetMusenalmID(musenalmID string) {
e.Set(MUSENALMID_FIELD, musenalmID)
}
func (e *Entry) EditState() string {
return e.GetString(EDITSTATE_FIELD)
}
func (e *Entry) SetEditState(editState string) {
e.Set(EDITSTATE_FIELD, editState)
}
func (e *Entry) Annotation() string {
return e.GetString(ANNOTATION_FIELD)
}
func (e *Entry) SetAnnotation(annotation string) {
e.Set(ANNOTATION_FIELD, annotation)
}
func (e *Entry) Comment() string {
return e.GetString(COMMENT_FIELD)
}
func (e *Entry) SetComment(comment string) {
e.Set(COMMENT_FIELD, comment)
}

View File

@@ -2,19 +2,122 @@ package dbmodels
import "github.com/pocketbase/pocketbase/core"
var _ core.RecordProxy = (*Item)(nil)
type Item struct {
core.BaseModel
Entry string `json:",omitempty" db:"entries"`
Identifier string `json:",omitempty" db:"identifier"`
Location string `json:",omitempty" db:"location"`
Owner string `json:",omitempty" db:"owner"`
Media string `json:",omitempty" db:"media"`
Condition string `json:",omitempty" db:"condition"`
Scans string `json:",omitempty" db:"scans"`
Uri string `json:",omitempty" db:"uri"`
AnnotatioNotes
core.BaseRecordProxy
// Entry string `json:",omitempty" db:"entries"`
// Identifier string `json:",omitempty" db:"identifier"`
// Location string `json:",omitempty" db:"location"`
// Owner string `json:",omitempty" db:"owner"`
// Media string `json:",omitempty" db:"media"`
// Condition string `json:",omitempty" db:"condition"`
// Scans string `json:",omitempty" db:"scans"`
// Uri string `json:",omitempty" db:"uri"`
}
func NewItem(record *core.Record) *Item {
i := &Item{}
i.SetProxyRecord(record)
return i
}
func (i *Item) TableName() string {
return ITEMS_TABLE
}
func (a *Item) Entry() string {
return a.GetString(ENTRIES_TABLE)
}
func (a *Item) SetEntry(entry string) {
a.Set(ENTRIES_TABLE, entry)
}
func (a *Item) Identifier() string {
return a.GetString(ITEMS_IDENTIFIER_FIELD)
}
func (a *Item) SetIdentifier(identifier string) {
a.Set(ITEMS_IDENTIFIER_FIELD, identifier)
}
func (a *Item) Location() string {
return a.GetString(ITEMS_LOCATION_FIELD)
}
func (a *Item) SetLocation(location string) {
a.Set(ITEMS_LOCATION_FIELD, location)
}
func (a *Item) Owner() string {
return a.GetString(ITEMS_OWNER_FIELD)
}
func (a *Item) SetOwner(owner string) {
a.Set(ITEMS_OWNER_FIELD, owner)
}
func (a *Item) Media() []string {
return a.GetStringSlice(ITEMS_MEDIA_FIELD)
}
func (a *Item) SetMedia(media []string) {
a.Set(ITEMS_MEDIA_FIELD, media)
}
func (a *Item) Condition() string {
return a.GetString(ITEMS_CONDITION_FIELD)
}
func (a *Item) SetCondition(condition string) {
a.Set(ITEMS_CONDITION_FIELD, condition)
}
func (a *Item) Scans() string {
return a.GetString(SCAN_FIELD)
}
func (a *Item) SetScans(scans string) {
a.Set(SCAN_FIELD, scans)
}
func (a *Item) Uri() string {
return a.GetString(URI_FIELD)
}
func (a *Item) SetUri(uri string) {
a.Set(URI_FIELD, uri)
}
func (a *Item) Notes() string {
return a.GetString(COMMENT_FIELD)
}
func (a *Item) SetNotes(notes string) {
a.Set(COMMENT_FIELD, notes)
}
func (a *Item) Annotation() string {
return a.GetString(ANNOTATION_FIELD)
}
func (a *Item) SetAnnotation(annotation string) {
a.Set(ANNOTATION_FIELD, annotation)
}
func (a *Item) EditState() string {
return a.GetString(EDITSTATE_FIELD)
}
func (a *Item) SetEditState(editState string) {
a.Set(EDITSTATE_FIELD, editState)
}
func (a *Item) Comments() string {
return a.GetString(COMMENT_FIELD)
}
func (a *Item) SetComments(comments string) {
a.Set(COMMENT_FIELD, comments)
}

75
dbmodels/place.go Normal file
View File

@@ -0,0 +1,75 @@
package dbmodels
import "github.com/pocketbase/pocketbase/core"
var _ core.RecordProxy = (*Place)(nil)
type Place struct {
core.BaseRecordProxy
}
func NewPlace(record *core.Record) *Place {
i := &Place{}
i.SetProxyRecord(record)
return i
}
func (p *Place) TableName() string {
return PLACES_TABLE
}
func (p *Place) Name() string {
return p.GetString(PLACES_NAME_FIELD)
}
func (p *Place) SetName(name string) {
p.Set(PLACES_NAME_FIELD, name)
}
func (p *Place) Fictional() bool {
return p.GetBool(PLACES_FICTIONAL_FIELD)
}
func (p *Place) SetFictional(fictional bool) {
p.Set(PLACES_FICTIONAL_FIELD, fictional)
}
func (p *Place) URI() string {
return p.GetString(URI_FIELD)
}
func (p *Place) SetURI(uri string) {
p.Set(URI_FIELD, uri)
}
func (p *Place) Annotation() string {
return p.GetString(ANNOTATION_FIELD)
}
func (p *Place) SetAnnotation(annotation string) {
p.Set(ANNOTATION_FIELD, annotation)
}
func (p *Place) MusenalmID() string {
return p.GetString(MUSENALMID_FIELD)
}
func (p *Place) SetMusenalmID(id string) {
p.Set(MUSENALMID_FIELD, id)
}
func (p *Place) EditState() string {
return p.GetString(EDITSTATE_FIELD)
}
func (p *Place) SetEditState(state string) {
p.Set(EDITSTATE_FIELD, state)
}
func (p *Place) Comment() string {
return p.GetString(COMMENT_FIELD)
}
func (p *Place) SetComment(comment string) {
p.Set(COMMENT_FIELD, comment)
}

View File

@@ -0,0 +1,75 @@
package dbmodels
import "github.com/pocketbase/pocketbase/core"
var _ core.RecordProxy = (*RContentsAgents)(nil)
type RContentsAgents struct {
core.BaseRecordProxy
}
func NewRContentsAgents(record *core.Record) *RContentsAgents {
i := &RContentsAgents{}
i.SetProxyRecord(record)
return i
}
func (r *RContentsAgents) TableName() string {
return RelationTableName(CONTENTS_TABLE, AGENTS_TABLE)
}
func (r *RContentsAgents) Content() string {
return r.GetString(CONTENTS_TABLE)
}
func (r *RContentsAgents) SetContent(content string) {
r.Set(CONTENTS_TABLE, content)
}
func (r *RContentsAgents) Agent() string {
return r.GetString(AGENTS_TABLE)
}
func (r *RContentsAgents) SetAgent(agent string) {
r.Set(AGENTS_TABLE, agent)
}
func (r *RContentsAgents) Type() string {
return r.GetString(RELATION_TYPE_FIELD)
}
func (r *RContentsAgents) SetType(relationType string) {
r.Set(RELATION_TYPE_FIELD, relationType)
}
func (r *RContentsAgents) Annotation() string {
return r.GetString(ANNOTATION_FIELD)
}
func (r *RContentsAgents) SetAnnotation(annotation string) {
r.Set(ANNOTATION_FIELD, annotation)
}
func (r *RContentsAgents) Comment() string {
return r.GetString(COMMENT_FIELD)
}
func (r *RContentsAgents) SetComment(comment string) {
r.Set(COMMENT_FIELD, comment)
}
func (r *RContentsAgents) Conjecture() bool {
return r.GetBool(RELATION_CONJECTURE_FIELD)
}
func (r *RContentsAgents) SetConjecture(conjecture bool) {
r.Set(RELATION_CONJECTURE_FIELD, conjecture)
}
func (r *RContentsAgents) Uncertain() bool {
return r.GetBool(RELATION_UNCERTAIN_FIELD)
}
func (r *RContentsAgents) SetUncertain(uncertain bool) {
r.Set(RELATION_UNCERTAIN_FIELD, uncertain)
}

View File

@@ -0,0 +1,75 @@
package dbmodels
import "github.com/pocketbase/pocketbase/core"
var _ core.RecordProxy = (*REntriesAgents)(nil)
type REntriesAgents struct {
core.BaseRecordProxy
}
func NewREntriesAgents(record *core.Record) *REntriesAgents {
i := &REntriesAgents{}
i.SetProxyRecord(record)
return i
}
func (r *REntriesAgents) TableName() string {
return RelationTableName(ENTRIES_TABLE, AGENTS_TABLE)
}
func (r *REntriesAgents) Entry() string {
return r.GetString(ENTRIES_TABLE)
}
func (r *REntriesAgents) SetEntry(entry string) {
r.Set(ENTRIES_TABLE, entry)
}
func (r *REntriesAgents) Agent() string {
return r.GetString(AGENTS_TABLE)
}
func (r *REntriesAgents) SetAgent(agent string) {
r.Set(AGENTS_TABLE, agent)
}
func (r *REntriesAgents) Type() string {
return r.GetString(RELATION_TYPE_FIELD)
}
func (r *REntriesAgents) SetType(relationType string) {
r.Set(RELATION_TYPE_FIELD, relationType)
}
func (r *REntriesAgents) Annotation() string {
return r.GetString(ANNOTATION_FIELD)
}
func (r *REntriesAgents) SetAnnotation(annotation string) {
r.Set(ANNOTATION_FIELD, annotation)
}
func (r *REntriesAgents) Comment() string {
return r.GetString(COMMENT_FIELD)
}
func (r *REntriesAgents) SetComment(comment string) {
r.Set(COMMENT_FIELD, comment)
}
func (r *REntriesAgents) Conjecture() bool {
return r.GetBool(RELATION_CONJECTURE_FIELD)
}
func (r *REntriesAgents) SetConjecture(conjecture bool) {
r.Set(RELATION_CONJECTURE_FIELD, conjecture)
}
func (r *REntriesAgents) Uncertain() bool {
return r.GetBool(RELATION_UNCERTAIN_FIELD)
}
func (r *REntriesAgents) SetUncertain(uncertain bool) {
r.Set(RELATION_UNCERTAIN_FIELD, uncertain)
}

View File

@@ -0,0 +1,83 @@
package dbmodels
import "github.com/pocketbase/pocketbase/core"
var _ core.RecordProxy = (*REntriesSeries)(nil)
type REntriesSeries struct {
core.BaseRecordProxy
}
func NewREntriesSeries(record *core.Record) *REntriesSeries {
i := &REntriesSeries{}
i.SetProxyRecord(record)
return i
}
func (r *REntriesSeries) TableName() string {
return RelationTableName(ENTRIES_TABLE, SERIES_TABLE)
}
func (r *REntriesSeries) Entry() string {
return r.GetString(ENTRIES_TABLE)
}
func (r *REntriesSeries) SetEntry(entry string) {
r.Set(ENTRIES_TABLE, entry)
}
func (r *REntriesSeries) Series() string {
return r.GetString(SERIES_TABLE)
}
func (r *REntriesSeries) SetSeries(series string) {
r.Set(SERIES_TABLE, series)
}
func (r *REntriesSeries) Numbering() string {
return r.GetString(NUMBERING_FIELD)
}
func (r *REntriesSeries) SetNumbering(numbering string) {
r.Set(NUMBERING_FIELD, numbering)
}
func (r *REntriesSeries) Type() string {
return r.GetString(RELATION_TYPE_FIELD)
}
func (r *REntriesSeries) SetType(relationType string) {
r.Set(RELATION_TYPE_FIELD, relationType)
}
func (r *REntriesSeries) Annotation() string {
return r.GetString(ANNOTATION_FIELD)
}
func (r *REntriesSeries) SetAnnotation(annotation string) {
r.Set(ANNOTATION_FIELD, annotation)
}
func (r *REntriesSeries) Comment() string {
return r.GetString(COMMENT_FIELD)
}
func (r *REntriesSeries) SetComment(comment string) {
r.Set(COMMENT_FIELD, comment)
}
func (r *REntriesSeries) Conjecture() bool {
return r.GetBool(RELATION_CONJECTURE_FIELD)
}
func (r *REntriesSeries) SetConjecture(conjecture bool) {
r.Set(RELATION_CONJECTURE_FIELD, conjecture)
}
func (r *REntriesSeries) Uncertain() bool {
return r.GetBool(RELATION_UNCERTAIN_FIELD)
}
func (r *REntriesSeries) SetUncertain(uncertain bool) {
r.Set(RELATION_UNCERTAIN_FIELD, uncertain)
}

83
dbmodels/series.go Normal file
View File

@@ -0,0 +1,83 @@
package dbmodels
import "github.com/pocketbase/pocketbase/core"
var _ core.RecordProxy = (*Series)(nil)
type Series struct {
core.BaseRecordProxy
}
func NewSeries(record *core.Record) *Series {
i := &Series{}
i.SetProxyRecord(record)
return i
}
func (s *Series) TableName() string {
return SERIES_TABLE
}
func (s *Series) Title() string {
return s.GetString(SERIES_TITLE_FIELD)
}
func (s *Series) SetTitle(title string) {
s.Set(SERIES_TITLE_FIELD, title)
}
func (s *Series) Pseudonyms() string {
return s.GetString(SERIES_PSEUDONYMS_FIELD)
}
func (s *Series) SetPseudonyms(pseudonyms string) {
s.Set(SERIES_PSEUDONYMS_FIELD, pseudonyms)
}
func (s *Series) References() string {
return s.GetString(REFERENCES_FIELD)
}
func (s *Series) SetReferences(references string) {
s.Set(REFERENCES_FIELD, references)
}
func (s *Series) Annotation() string {
return s.GetString(ANNOTATION_FIELD)
}
func (s *Series) SetAnnotation(annotation string) {
s.Set(ANNOTATION_FIELD, annotation)
}
func (s *Series) MusenalmID() string {
return s.GetString(MUSENALMID_FIELD)
}
func (s *Series) SetMusenalmID(id string) {
s.Set(MUSENALMID_FIELD, id)
}
func (s *Series) EditState() string {
return s.GetString(EDITSTATE_FIELD)
}
func (s *Series) SetEditState(editState string) {
s.Set(EDITSTATE_FIELD, editState)
}
func (s *Series) Comment() string {
return s.GetString(COMMENT_FIELD)
}
func (s *Series) SetComment(comment string) {
s.Set(COMMENT_FIELD, comment)
}
func (s *Series) Frequency() string {
return s.GetString(SERIES_FREQUENCY_FIELD)
}
func (s *Series) SetFrequency(frequency string) {
s.Set(SERIES_FREQUENCY_FIELD, frequency)
}