Files
astra-events/model/event.go
2023-08-01 16:48:54 +03:00

29 lines
820 B
Go

package model
import (
"github.com/google/uuid"
"gorm.io/gorm"
"time"
)
type Event struct {
gorm.Model
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primarykey"`
Start time.Time `json:"start"`
End time.Time `json:"end"`
Author User `json:"author" gorm:"-"`
AuthorId uuid.UUID `json:"-"`
Medic User `json:"medic" gorm:"-"`
MedicId uuid.UUID `json:"-"`
Person PersonalInformation `json:"person" gorm:"-"`
PersonId uuid.UUID `json:"-"`
OrgId uuid.UUID `json:"-"`
}
type CreateEvent struct {
Start time.Time `json:"start"`
End time.Time `json:"end"`
Person PersonalInformation `json:"person"`
MedicId uuid.UUID `json:"medic_id"`
}