Skip to content

Commit

Permalink
feat(models.User): add HasPostedComments field
Browse files Browse the repository at this point in the history
  • Loading branch information
Prince213 committed Apr 26, 2024
1 parent 9080ba9 commit cf07a3f
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions pkg/models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@ const (

type User struct {
gorm.Model
Email string `gorm:"index"`
Password string
NickName string
RealName string
Year int
Grade GradeType
IsActive bool
Avatar string
IsAnonymous bool
IsAdmin bool `gorm:"default:false"`
IsCommunityAdmin bool `gorm:"default:false"`
InvitationCode string
Reward int
Email string `gorm:"index"`
Password string
NickName string
RealName string
Year int
Grade GradeType
IsActive bool
Avatar string
IsAnonymous bool
IsAdmin bool `gorm:"default:false"`
IsCommunityAdmin bool `gorm:"default:false"`
InvitationCode string
Reward int
HasPostedComments bool `gorm:"default:false"`
}

func init() {
Expand Down

0 comments on commit cf07a3f

Please sign in to comment.