Compare commits

...

2 Commits
v1.0.6 ... main

Author SHA1 Message Date
alex c7c6f2cd22 added reply id 2024-09-10 22:33:25 +02:00
alex db2c573b33 update question model 2024-09-10 19:22:00 +02:00
1 changed files with 3 additions and 18 deletions

View File

@ -5,7 +5,9 @@ import "time"
type Question struct {
Id string `gorm:"primaryKey;type:varchar(36)"`
LessonId string `gorm:"type:varchar(36)"`
Question string `gorm:"type:text"`
QuestionId string `gorm:"type:varchar(36)"`
ReplyId string `gorm:"type:varchar(36)"`
Message string `gorm:"type:text"`
Likes uint16 `gorm:"type:smallint(5)"`
CreatorUserId string `gorm:"type:varchar(36)"`
CreatedAt time.Time
@ -19,20 +21,3 @@ type QuestionLike struct {
CreatedAt time.Time
UpdatedAt time.Time
}
type QuestionReply struct {
Id string `gorm:"primaryKey;type:varchar(36)"`
QuestionId string `gorm:"type:varchar(36)"`
Reply string `gorm:"type:text"`
CreatorUserId string `gorm:"type:varchar(36)"`
CreatedAt time.Time
UpdatedAt time.Time
}
type QuestionReplyLike struct {
Id string `gorm:"primaryKey;type:varchar(36)"`
QuestionReplyId string `gorm:"type:varchar(36)"`
CreatorUserId string `gorm:"type:varchar(36)"`
CreatedAt time.Time
UpdatedAt time.Time
}