From db2c573b337bdfdec46f08303af432b456da586e Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 10 Sep 2024 19:22:00 +0200 Subject: [PATCH] update question model --- models/questions.go | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/models/questions.go b/models/questions.go index 788e9f7..b1c5b77 100644 --- a/models/questions.go +++ b/models/questions.go @@ -4,8 +4,9 @@ import "time" type Question struct { Id string `gorm:"primaryKey;type:varchar(36)"` + QuestionId string `gorm:"type:varchar(36)"` LessonId string `gorm:"type:varchar(36)"` - Question string `gorm:"type:text"` + Message string `gorm:"type:text"` Likes uint16 `gorm:"type:smallint(5)"` CreatorUserId string `gorm:"type:varchar(36)"` CreatedAt time.Time @@ -19,20 +20,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 -}