feat:#16 added uuid and fixed some pointer logic

This commit is contained in:
Elmar Kresse
2023-10-23 03:09:16 +02:00
parent f8a24aca1b
commit e20dde27fb
4 changed files with 97 additions and 19 deletions

View File

@@ -5,7 +5,7 @@ import "github.com/pocketbase/pocketbase/models"
type Events []*Event
type Event struct {
UUID string `db:"UUID" json:"uuid"`
UUID string `db:"uuid" json:"uuid"`
Day string `db:"Day" json:"day"`
Week string `db:"Week" json:"week"`
Start string `db:"Start" json:"start"`
@@ -24,3 +24,9 @@ type Event struct {
func (m *Event) TableName() string {
return "events"
}
// SetCourse func to set the course and returns the event
func (m *Event) SetCourse(course string) Event {
m.Course = course
return *m
}