mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 11:06:23 +00:00
feat: enhance post management with pagination, search, and order functionality
All checks were successful
Push to Helm Chart Repository / build (push) Successful in 11s
All checks were successful
Push to Helm Chart Repository / build (push) Successful in 11s
- Added search input for filtering posts by keywords. - Implemented pagination controls for navigating through posts. - Introduced order selector for sorting posts based on various criteria. - Enhanced post item display with additional metrics (view count, like count, comment count). - Added dropdown menu for post actions (edit, view, toggle privacy, delete). - Integrated double confirmation for delete action. - Updated user profile to support background image upload. - Improved user security settings with better layout and validation. - Refactored auth context to use useCallback for logout function. - Added command palette component for improved command execution. - Introduced popover component for better UI interactions. - Implemented debounce hooks for optimized state updates. - Updated localization files with new keys for improved internationalization. - Added tailwind configuration for styling.
This commit is contained in:
@ -7,14 +7,15 @@ import (
|
||||
|
||||
type User struct {
|
||||
gorm.Model
|
||||
Username string `gorm:"uniqueIndex;not null"` // 用户名,唯一
|
||||
Nickname string `gorm:"default:''"` // 昵称
|
||||
AvatarUrl string
|
||||
Email string `gorm:"uniqueIndex"`
|
||||
Gender string `gorm:"default:''"`
|
||||
Role string `gorm:"default:'user'"` // user editor admin
|
||||
Language string `gorm:"default:'en'"`
|
||||
Password string // 密码,存储加密后的值
|
||||
Username string `gorm:"uniqueIndex;not null"` // 用户名,唯一
|
||||
Nickname string `gorm:"default:''"` // 昵称
|
||||
AvatarUrl string
|
||||
BackgroundUrl string
|
||||
Email string `gorm:"uniqueIndex"`
|
||||
Gender string `gorm:"default:''"`
|
||||
Role string `gorm:"default:'user'"` // user editor admin
|
||||
Language string `gorm:"default:'en'"`
|
||||
Password string // 密码,存储加密后的值
|
||||
}
|
||||
|
||||
type UserOpenID struct {
|
||||
@ -27,13 +28,14 @@ type UserOpenID struct {
|
||||
|
||||
func (user *User) ToDto() dto.UserDto {
|
||||
return dto.UserDto{
|
||||
ID: user.ID,
|
||||
Username: user.Username,
|
||||
Nickname: user.Nickname,
|
||||
AvatarUrl: user.AvatarUrl,
|
||||
Email: user.Email,
|
||||
Gender: user.Gender,
|
||||
Role: user.Role,
|
||||
Language: user.Language,
|
||||
ID: user.ID,
|
||||
Username: user.Username,
|
||||
Nickname: user.Nickname,
|
||||
AvatarUrl: user.AvatarUrl,
|
||||
BackgroundUrl: user.BackgroundUrl,
|
||||
Email: user.Email,
|
||||
Gender: user.Gender,
|
||||
Role: user.Role,
|
||||
Language: user.Language,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user