[add] initial commit

This commit is contained in:
2022-09-30 14:59:51 -05:00
commit 3da5d6a560
15 changed files with 825 additions and 0 deletions

19
app/models/model.go Normal file
View File

@@ -0,0 +1,19 @@
package models
import (
"gelvin/app/application"
)
type Model struct {
app *application.Application
}
func NewModel(app *application.Application) *Model {
return &Model{
app: app,
}
}
func Migrate(app *application.Application) error {
return app.Db().AutoMigrate(&Sensor{}, &Measurement{})
}