27 lines
512 B
Go
Raw Normal View History

2024-02-03 00:50:23 +08:00
package models
import (
"time"
)
2024-02-03 00:50:23 +08:00
type ReactionAttitude = uint8
2024-02-03 00:50:23 +08:00
const (
AttitudeNeutral = ReactionAttitude(iota)
AttitudePositive
AttitudeNegative
)
2024-03-03 01:23:11 +08:00
type Reaction struct {
2024-03-03 01:23:11 +08:00
ID uint `json:"id" gorm:"primaryKey"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Symbol string `json:"symbol"`
Attitude ReactionAttitude `json:"attitude"`
2024-03-03 01:23:11 +08:00
2024-05-15 19:45:49 +08:00
PostID *uint `json:"post_id"`
ArticleID *uint `json:"article_id"`
AccountID uint `json:"account_id"`
2024-02-03 00:50:23 +08:00
}