meetandeat/models/date.go

19 lines
321 B
Go
Raw Permalink Normal View History

2019-03-22 16:35:16 +01:00
package models
import (
"time"
"dev.sum7.eu/genofire/golang-lib/database"
)
type Date struct {
ID int `json:"id" gorm:"PRIMARY_KEY"`
Date time.Time `json:"date"`
Meets []DateMeet `gorm:"foreignkey:ID" json:"meets"`
}
// Function to initialize the database
func init() {
database.AddModel(&Date{})
}