fix: add tsType tags for time.Time fields
This commit is contained in:
@@ -11,8 +11,8 @@ type Participant struct {
|
||||
TimeLimit int `json:"timeLimit" gorm:"default:120"` // seconds
|
||||
Order int `json:"order" gorm:"default:0"`
|
||||
Active bool `json:"active" gorm:"default:true"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
CreatedAt time.Time `json:"createdAt" tsType:"string"`
|
||||
UpdatedAt time.Time `json:"updatedAt" tsType:"string"`
|
||||
}
|
||||
|
||||
type Meeting struct {
|
||||
@@ -20,15 +20,15 @@ type Meeting struct {
|
||||
Name string `json:"name" gorm:"not null;default:Daily Standup"`
|
||||
TimeLimit int `json:"timeLimit" gorm:"default:3600"` // total meeting limit in seconds (1 hour)
|
||||
Sessions []MeetingSession `json:"sessions,omitempty" gorm:"foreignKey:MeetingID"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
CreatedAt time.Time `json:"createdAt" tsType:"string"`
|
||||
UpdatedAt time.Time `json:"updatedAt" tsType:"string"`
|
||||
}
|
||||
|
||||
type MeetingSession struct {
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
MeetingID uint `json:"meetingId" gorm:"not null"`
|
||||
StartedAt time.Time `json:"startedAt"`
|
||||
EndedAt *time.Time `json:"endedAt,omitempty"`
|
||||
StartedAt time.Time `json:"startedAt" tsType:"string"`
|
||||
EndedAt *time.Time `json:"endedAt,omitempty" tsType:"string"`
|
||||
TotalDuration int `json:"totalDuration"` // seconds
|
||||
Completed bool `json:"completed" gorm:"default:false"`
|
||||
ParticipantLogs []ParticipantLog `json:"participantLogs,omitempty" gorm:"foreignKey:SessionID"`
|
||||
@@ -40,8 +40,8 @@ type ParticipantLog struct {
|
||||
SessionID uint `json:"sessionId" gorm:"not null"`
|
||||
ParticipantID uint `json:"participantId" gorm:"not null"`
|
||||
Participant Participant `json:"participant,omitempty" gorm:"foreignKey:ParticipantID"`
|
||||
StartedAt time.Time `json:"startedAt"`
|
||||
EndedAt *time.Time `json:"endedAt,omitempty"`
|
||||
StartedAt time.Time `json:"startedAt" tsType:"string"`
|
||||
EndedAt *time.Time `json:"endedAt,omitempty" tsType:"string"`
|
||||
Duration int `json:"duration"` // seconds
|
||||
Skipped bool `json:"skipped" gorm:"default:false"`
|
||||
Overtime bool `json:"overtime" gorm:"default:false"`
|
||||
|
||||
Reference in New Issue
Block a user