refactor:#16 event saving shortened

This commit is contained in:
Elmar Kresse
2023-10-23 00:55:11 +02:00
parent 1a12107fb6
commit f8a24aca1b
4 changed files with 19 additions and 44 deletions

View File

@@ -1,8 +1,11 @@
package model
import "github.com/pocketbase/pocketbase/models"
type Events []*Event
type Event struct {
UUID string `db:"UUID" json:"uuid"`
Day string `db:"Day" json:"day"`
Week string `db:"Week" json:"week"`
Start string `db:"Start" json:"start"`
@@ -15,4 +18,9 @@ type Event struct {
BookedAt string `db:"BookedAt" json:"bookedAt"`
Course string `db:"course" json:"course"`
Semester string `db:"semester" json:"semester"`
models.BaseModel
}
func (m *Event) TableName() string {
return "events"
}