Documentation ¶
Index ¶
- func NewTodaRepo(tx *gorm.DB) toda.ITodaRepo
- func NewTodaRoute(todaService toda.ITodaService) toda.ITodaRoute
- type TodaRepo
- func (s *TodaRepo) Delete(id uint) (uint, error)
- func (s *TodaRepo) First(querier *dto.TodaQuerier) (*entity.Toda, error)
- func (s *TodaRepo) Get(id uint) (*entity.Toda, error)
- func (s *TodaRepo) List(querier *dto.TodaQuerier) ([]*entity.Toda, error)
- func (s *TodaRepo) ListUserToda(querier *dto.ListUserTodaQuerier) ([]*vo.UserTodaVO, error)
- func (s *TodaRepo) Save(form *entity.Toda) (*entity.Toda, error)
- type TodaRouteImpl
- type TodaService
- func (s *TodaService) Delete(ctx context.Context, id uint) (uint, error)
- func (s *TodaService) FlowToda(ctx context.Context, form *dto.FlowTodaDTO) (*uint, error)
- func (s *TodaService) Get(ctx context.Context, id uint) (*entity.Toda, error)
- func (s *TodaService) List(ctx context.Context, querier *dto.ListUserTodaQuerier) ([]*vo.UserTodaVO, error)
- func (s *TodaService) Save(ctx context.Context, form *dto.TodaSaveDTO) (*vo.UserTodaVO, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTodaRoute ¶
func NewTodaRoute(todaService toda.ITodaService) toda.ITodaRoute
Types ¶
type TodaRepo ¶
type TodaRepo struct {
// contains filtered or unexported fields
}
func (*TodaRepo) ListUserToda ¶
func (s *TodaRepo) ListUserToda(querier *dto.ListUserTodaQuerier) ([]*vo.UserTodaVO, 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) 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) 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)
Click to show internal directories.
Click to hide internal directories.