feat: 新增路由配置、通知和公告功能,并初始化相关服务和仓库。

This commit is contained in:
2026-02-02 17:13:33 +08:00
parent 4b2355deee
commit 948be39286
8 changed files with 220 additions and 4 deletions

View File

@@ -66,7 +66,6 @@ func (r *UserRepository) GetByEmail(email string) (*models.User, error) {
return &user, nil
}
// Update updates a user in the database
func (r *UserRepository) Update(user *models.User) error {
return r.db.Save(user).Error
@@ -163,3 +162,8 @@ func (r *UserRepository) EmailExists(email string) (bool, error) {
}
return count > 0, nil
}
// DB returns the underlying gorm.DB instance
func (r *UserRepository) DB() *gorm.DB {
return r.db
}