mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-03 02:09:15 +02:00
feat:#16 added uuid and fixed some pointer logic
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user