todaImpl

package
v0.0.0-...-4b144c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTodaRepo

func NewTodaRepo(tx *gorm.DB) toda.ITodaRepo

func NewTodaRoute

func NewTodaRoute(todaService toda.ITodaService) toda.ITodaRoute

Types

type TodaRepo

type TodaRepo struct {
	// contains filtered or unexported fields
}

func (*TodaRepo) Delete

func (s *TodaRepo) Delete(id uint) (uint, error)

func (*TodaRepo) First

func (s *TodaRepo) First(querier *dto.TodaQuerier) (*entity.Toda, error)

func (*TodaRepo) Get

func (s *TodaRepo) Get(id uint) (*entity.Toda, error)

func (*TodaRepo) List

func (s *TodaRepo) List(querier *dto.TodaQuerier) ([]*entity.Toda, error)

func (*TodaRepo) ListUserToda

func (s *TodaRepo) ListUserToda(querier *dto.ListUserTodaQuerier) ([]*vo.UserTodaVO, error)

func (*TodaRepo) Save

func (s *TodaRepo) Save(form *entity.Toda) (*entity.Toda, error)

type TodaRouteImpl

type TodaRouteImpl struct {
	// contains filtered or unexported fields
}

func (*TodaRouteImpl) Delete

func (r *TodaRouteImpl) Delete(c fiber.Ctx) error

func (*TodaRouteImpl) FlowToda

func (r *TodaRouteImpl) FlowToda(c fiber.Ctx) error

func (*TodaRouteImpl) Get

func (r *TodaRouteImpl) Get(c fiber.Ctx) error

func (*TodaRouteImpl) List

func (r *TodaRouteImpl) List(c fiber.Ctx) error

func (*TodaRouteImpl) Register

func (r *TodaRouteImpl) Register(root fiber.Router)

func (*TodaRouteImpl) Save

func (r *TodaRouteImpl) Save(c fiber.Ctx) error

type TodaService

type TodaService struct {
	// contains filtered or unexported fields
}

func NewTodaService

func NewTodaService(repo repo.IRepo) *TodaService

func (*TodaService) Delete

func (s *TodaService) Delete(ctx context.Context, id uint) (uint, error)

func (*TodaService) FlowToda

func (s *TodaService) FlowToda(ctx context.Context, form *dto.FlowTodaDTO) (*uint, error)

FlowToda updates the status of a Toda entity and records the change in the TodaFlow entity. It first verifies if the user has permission to modify the specified Toda by checking writability. If writable, it creates a TodaFlow record with the previous and new status, then updates the Toda status. Returns the ID of the Toda if successful, or an error if any step fails.

func (*TodaService) Get

func (s *TodaService) Get(ctx context.Context, id uint) (*entity.Toda, error)

func (*TodaService) List

func (s *TodaService) List(ctx context.Context, querier *dto.ListUserTodaQuerier) ([]*vo.UserTodaVO, error)

func (*TodaService) Save

func (s *TodaService) Save(ctx context.Context, form *dto.TodaSaveDTO) (*vo.UserTodaVO, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL