strategy

package
v2.0.0-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTotalStrategiesCount

func GetTotalStrategiesCount(dbConnPgx utils.PgxIface) (*int, error)

func InsertStrategies

func InsertStrategies(dbConnPgx utils.PgxIface, strategies []Strategy) error

func InsertStrategy

func InsertStrategy(dbConnPgx utils.PgxIface, strategy *Strategy) (int, error)

func RemoveStrategy

func RemoveStrategy(dbConnPgx utils.PgxIface, strategyID *int) error

func UpdateStrategy

func UpdateStrategy(dbConnPgx utils.PgxIface, strategy *Strategy) error

Types

type Strategy

type Strategy struct {
	ID             *int       `json:"id" db:"id"`                           //1
	UUID           string     `json:"uuid" db:"uuid"`                       //2
	Name           string     `json:"name" db:"name"`                       //3
	AlternateName  string     `json:"alternateName" db:"alternate_name"`    //4
	StartDate      *time.Time `json:"startDate" db:"start_date"`            //5
	EndDate        *time.Time `json:"endDate" db:"end_date"`                //6
	Description    string     `json:"description" db:"description"`         //7
	StrategyTypeID *int       `json:"strategyTypeId" db:"strategy_type_id"` //8
	CreatedBy      string     `json:"createdBy" db:"created_by"`            //9
	CreatedAt      time.Time  `json:"createdAt" db:"created_at"`            //10
	UpdatedBy      string     `json:"updatedBy" db:"updated_by"`            //11
	UpdatedAt      time.Time  `json:"updatedAt" db:"updated_at"`            //12
}

Strategy

func GetStartAndEndDateDiffStrategies

func GetStartAndEndDateDiffStrategies(dbConnPgx utils.PgxIface, diffInDate *int) ([]Strategy, error)

func GetStrategies

func GetStrategies(dbConnPgx utils.PgxIface, ids []int) ([]Strategy, error)

func GetStrategiesByUUIDs

func GetStrategiesByUUIDs(dbConnPgx utils.PgxIface, UUIDList []string) ([]Strategy, error)

func GetStrategy

func GetStrategy(dbConnPgx utils.PgxIface, strategyID *int) (*Strategy, error)

func GetStrategyListByPagination

func GetStrategyListByPagination(dbConnPgx utils.PgxIface, _start, _end *int, _order, _sort string, _filters []string) ([]Strategy, error)

for refinedev

Jump to

Keyboard shortcuts

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