Merge pull request 'feat(gamification): add gamification domain structure' (#290) from feature/gamification into develop

Reviewed-on: ebhomengo/niki#290
This commit is contained in:
hossein 2026-04-29 04:55:28 +00:00
commit 14e9a51fb6
8 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,11 @@
package mysql
import "git.gocasts.ir/ebhomengo/niki/repository/mysql"
type DB struct {
conn *mysql.DB
}
func New(db *mysql.DB) *DB {
return &DB{conn: db}
}

View File

@ -0,0 +1 @@
package mysql

View File

@ -0,0 +1,8 @@
package service
type Service struct {
repo Repo
}
type Repo interface {
}

11
gamificationapp/app.go Normal file
View File

@ -0,0 +1,11 @@
package gamificationapp
type Application struct {
Config Config
}
func setUp(cnf Config) *Application {
return &Application{
cnf,
}
}

View File

@ -0,0 +1,4 @@
package gamificationapp
type Config struct {
}

View File

@ -0,0 +1,15 @@
package gamification
import (
gamification "git.gocasts.ir/ebhomengo/niki/domain/gamification/service"
)
type Handler struct {
GamificationSvc gamification.Service
}
func New(gamificationSvc gamification.Service) *Handler {
return &Handler{
GamificationSvc: gamificationSvc,
}
}

View File

@ -0,0 +1,7 @@
package gamification
import "github.com/labstack/echo/v4"
func (h Handler) SetRoutes(e *echo.Echo) {
}

View File

@ -0,0 +1,13 @@
package http
import "git.gocasts.ir/ebhomengo/niki/gamificationapp/delivery/http/gamification"
type Server struct {
gamificationHandler *gamification.Handler
}
func New(handler gamification.Handler) *Server {
return &Server{
gamificationHandler: &handler,
}
}