优化页面、修复BUG
This commit is contained in:
@@ -45,6 +45,20 @@ func (c *Column) BeforeUpdate(tx *gorm.DB) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ColumnResponse 专栏 API 响应
|
||||
type ColumnResponse struct {
|
||||
ID uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Cover string `json:"cover"`
|
||||
IsActive int `json:"isActive"`
|
||||
SortOrder uint `json:"sortOrder"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
PostCount int64 `json:"postCount,omitempty"`
|
||||
LastUpdated string `json:"lastUpdated,omitempty"`
|
||||
}
|
||||
|
||||
// ColumnPost 专栏文章关联模型
|
||||
type ColumnPost struct {
|
||||
ColumnID uint `json:"columnId" gorm:"primaryKey;column:column_id"`
|
||||
|
||||
Reference in New Issue
Block a user