probo/models/exam.go

24 lines
371 B
Go
Raw Normal View History

2023-10-18 13:40:21 +02:00
package models
2023-10-28 20:50:06 +02:00
import (
"time"
"gorm.io/gorm"
)
2023-10-18 13:40:21 +02:00
type Exam struct {
2023-10-28 20:50:06 +02:00
ID string `gorm:"primaryKey"`
2023-10-18 13:40:21 +02:00
CreatedAt time.Time
2023-10-28 20:50:06 +02:00
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
Name string
Description string
2023-10-18 13:40:21 +02:00
2023-10-28 20:50:06 +02:00
Collection *Collection `gorm:"foreignKey:ID"`
Participant []*Participant `gorm:"many2many:exam_participants"`
2023-10-18 13:40:21 +02:00
2023-10-28 20:50:06 +02:00
// Responses []string
2023-10-18 13:40:21 +02:00
}