mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-05 16:56:22 +00:00
⚡ add like functionality with Like model, implement like/unlike methods, and update Post and Comment models to track like counts
This commit is contained in:
@ -4,7 +4,8 @@ import "gorm.io/gorm"
|
||||
|
||||
type Label struct {
|
||||
gorm.Model
|
||||
Key string `gorm:"uniqueIndex"` // 标签键,唯一标识
|
||||
Value string `gorm:"type:text"` // 标签值,描述标签的内容
|
||||
Color string `gorm:"type:text"` // 前端可用颜色代码
|
||||
Key string `gorm:"uniqueIndex"` // 标签键,唯一标识
|
||||
Value string `gorm:"type:text"` // 标签值,描述标签的内容
|
||||
Color string `gorm:"type:text"` // 前端可用颜色代码
|
||||
TailwindClassName string `gorm:"type:text"` // Tailwind CSS 的类名,用于前端样式
|
||||
}
|
||||
|
Reference in New Issue
Block a user