19 lines
321 B
Go
19 lines
321 B
Go
|
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{})
|
||
|
}
|