libcore/models/questions.go

24 lines
681 B
Go
Raw Permalink Normal View History

2024-09-07 13:18:20 +02:00
package models
import "time"
type Question struct {
Id string `gorm:"primaryKey;type:varchar(36)"`
LessonId string `gorm:"type:varchar(36)"`
2024-09-10 22:33:25 +02:00
QuestionId string `gorm:"type:varchar(36)"`
ReplyId string `gorm:"type:varchar(36)"`
2024-09-10 19:22:00 +02:00
Message string `gorm:"type:text"`
2024-09-07 13:18:20 +02:00
Likes uint16 `gorm:"type:smallint(5)"`
CreatorUserId string `gorm:"type:varchar(36)"`
CreatedAt time.Time
UpdatedAt time.Time
}
type QuestionLike struct {
Id string `gorm:"primaryKey;type:varchar(36)"`
QuestionId string `gorm:"type:varchar(36)"`
CreatorUserId string `gorm:"type:varchar(36)"`
CreatedAt time.Time
UpdatedAt time.Time
}