package structs

import "time"

type Question struct {
	Id            string `gorm:"primaryKey;type:varchar(36)"`
	LessonId      string `gorm:"type:varchar(36)"`
	Question      string `gorm:"type:text"`
	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
}

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
}
