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