- Define userRepository, userRoleRepository, roleRepository, passwordHistoryRepository interfaces - Update UserService struct to use interface types instead of concrete *repository types - Update NewUserService constructor to accept interfaces - Add UserCursorResult type (avoid conflict with login_log.go's CursorResult) - Fix AssignRoles to use type assertion for WithTx (concrete method not in interface) - Add GetByEmail, UpdateStatus, BatchUpdateStatus, BatchDelete to userRepository interface - Add GetByID, GetByIDs to roleRepository interface This enables dependency injection and mocking at the service layer.
14 KiB
14 KiB