upvotes models
This commit is contained in:
@@ -15,7 +15,7 @@ type Feedback struct {
|
|||||||
Type FeedbackType `gorm:"type:varchar(255)"`
|
Type FeedbackType `gorm:"type:varchar(255)"`
|
||||||
Text string `gorm:"type:varchar(300)"`
|
Text string `gorm:"type:varchar(300)"`
|
||||||
|
|
||||||
Upvote []Upvote `gorm:"foreignKey:FeedbackUUID;references:UUID"`
|
Upvote []Upvote `gorm:"foreignKey:FeedbackUUID"`
|
||||||
|
|
||||||
CreatedAt time.Time `gorm:"type:timestamp"`
|
CreatedAt time.Time `gorm:"type:timestamp"`
|
||||||
UpdatedAt time.Time `gorm:"type:timestamp"`
|
UpdatedAt time.Time `gorm:"type:timestamp"`
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
type Upvote struct {
|
type Upvote struct {
|
||||||
UUID string `gorm:"primaryKey"`
|
UUID string `gorm:"primaryKey"`
|
||||||
SessionUUID string `gorm:"type:varchar(255);unique"`
|
SessionUUID string `gorm:"type:varchar(255)"`
|
||||||
FeedbackUUID string `gorm:"type:varchar(255)"`
|
FeedbackUUID string `gorm:"type:varchar(255)"`
|
||||||
CreatedAt time.Time `gorm:"type:timestamp"`
|
CreatedAt time.Time `gorm:"type:timestamp"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user