Skip to content

feat(player_present_srv): Implement present systems

Dosugamea requested to merge Dosugamea/server:feat/impl-presents into main

Summary

This PR implements present endpoints. This one includes, receivePresent, showPresents, showReceivedPresents endpoints. The present related functions should be called from other endpoints but this one only implementes endpoints.

Changes Made

  • Implement
    • internal/application/service/player_present_service.go
    • internal/application/usecase/user_present_usecase.go
      • Implemented user present usecase + service
    • internal/domain/repository/user_present_repository.go
    • internal/infrastructure/persistence/user_present_persistence.go
      • Implemented user present persistence layers
  • Enhancement
    • internal/domain/model/user/user_present_model.go
      • Add database field index for better performance
    • internal/interfaces/api_player_present_service.go
    • internal/interfaces/model_get_all_player_present_response_transfer.go
      • Recreated model transfer layers
  • Chore
    • internal/registry/providers/usecase/provider.go
    • internal/registry/wire.go
    • internal/registry/wire_gen.go
    • internal/application/service/wire.go
    • internal/application/service/wire_gen.go
      • recreated the wires

Testing

  • Open presents screen works without issue
  • Open received presents screen works without issue
  • Account registering flow is still working

Checklist

  • No extra unnecessary files are included.
  • No extra fmt.Println() or fmt.Printf() statements are present.
  • The game client can accept the response (optional)

Additional Information

  • This feature should be called from other endpoint processes, but it isn't connected in this PR yet.

Summary by CodeRabbit

  • New Features
    • Introduced new functionalities for managing user presents, including the ability to view lists of receivable and received presents.
  • Enhancements
    • Improved the player presents service logic to enhance data processing and response structure, including additional information like server time and version.
  • Refactor
    • Updated service dependencies and initialization processes to integrate new user present management capabilities.
Edited by Dosugamea

Merge request reports