init push
This commit is contained in:
35
internal/service/takeover_module_service.go
Normal file
35
internal/service/takeover_module_service.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
takeover "wucher/internal/domain/takeover"
|
||||
)
|
||||
|
||||
type TakeoverModuleService struct {
|
||||
repo takeover.Repository
|
||||
}
|
||||
|
||||
func NewTakeoverModuleService(repo takeover.Repository) *TakeoverModuleService {
|
||||
return &TakeoverModuleService{repo: repo}
|
||||
}
|
||||
|
||||
func (s *TakeoverModuleService) Create(ctx context.Context, row *takeover.TakeoverAc) error {
|
||||
return s.repo.Create(ctx, row)
|
||||
}
|
||||
|
||||
func (s *TakeoverModuleService) Update(ctx context.Context, row *takeover.TakeoverAc) error {
|
||||
return s.repo.Update(ctx, row)
|
||||
}
|
||||
|
||||
func (s *TakeoverModuleService) Delete(ctx context.Context, id []byte, deletedBy []byte) error {
|
||||
return s.repo.Delete(ctx, id, deletedBy)
|
||||
}
|
||||
|
||||
func (s *TakeoverModuleService) GetByID(ctx context.Context, id []byte) (*takeover.TakeoverAc, error) {
|
||||
return s.repo.GetByID(ctx, id)
|
||||
}
|
||||
|
||||
func (s *TakeoverModuleService) List(ctx context.Context, limit, offset int) ([]takeover.TakeoverAc, int64, error) {
|
||||
return s.repo.List(ctx, limit, offset)
|
||||
}
|
||||
Reference in New Issue
Block a user