unit

package
v0.2.0-beta-8 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model interface {
	GetUnitID() string
	GetYear() string
	GetMake() string
	GetModel() string
	GetDescription() string
	GetSerial() *string
	GetEngine() *string
	GetStatus() string
	GetProductCode() *string
	GetIsNew() bool
	GetColor() *string
	GetHorsePower() *int
	GetEngineHours() *float64
	GetLocation() string
	GetAccount() string
	GetCreatedAt() time.Time
	GetSoldAt() *time.Time
	GetInvoiceNumber() *string
	GetSoldAccount() *string
	GetRevenueAmount() *float64
	GetCost() float64
	GetSoldTo() *string
	GetSoldBy() *string
	GetSoldByName() *string
	GetWarrantyCode() *string
	GetTradedOnUnit() *string
	GetGLAccount() *string
	GetSuggestedList() *float64
	GetDealerList() *float64
	GetFlooringDueDate() *time.Time
	GetFlooringAmount() *float64
	GetRentalStartDate() *time.Time
	GetRentalRevenue() *float64
	GetRentalCost() *float64
	GetSoldToName() *string
	GetSoldToAddress() *string
	GetSoldToCity() *string
	GetSoldToZip() *string
	GetPhoneNumber() *string
	ToUnitSpec() *types.UnitSpec
}

type Unit

type Unit struct {
	UnitID          string     `mapstructure:"UNIT"`
	Year            string     `mapstructure:"YEAR"`
	Make            string     `mapstructure:"MAKE"`
	Model           string     `mapstructure:"MODEL"`
	Description     string     `mapstructure:"DESCR"`
	Serial          *string    `mapstructure:"SERIAL"`
	Engine          *string    `mapstructure:"ENGINE"`
	Status          string     `mapstructure:"STATUS"`
	ProductCode     *string    `mapstructure:"PRODCT"`
	IsNew           string     `mapstructure:"NEWUSE"`
	Color           *string    `mapstructure:"COLOR"`
	HorsePower      *int       `mapstructure:"HRSPWR"`
	EngineHours     *float64   `mapstructure:"HOUR"`
	Location        string     `mapstructure:"LOCATE"`
	Account         string     `mapstructure:"ACCT#"`
	CreatedAt       time.Time  `mapstructure:"INDATE"`
	SoldAt          *time.Time `mapstructure:"SALEDT"`
	InvoiceNumber   *string    `mapstructure:"INV#"`
	SoldAccount     *string    `mapstructure:"SOLDTO"`
	RevenueAmount   *float64   `mapstructure:"AMOUNT"`
	Cost            float64    `mapstructure:"COST"`
	SoldBy          *string    `mapstructure:"SOLDBY"`
	SoldByName      *string    `mapstructure:"BYNAME"`
	WarrantyCode    *string    `mapstructure:"WARRCD"`
	TradedOnUnit    *string    `mapstructure:"TRADE"`
	GLAccount       *string    `mapstructure:"INACCT"`
	SuggestedList   *float64   `mapstructure:"SLIST"`
	DealerList      *float64   `mapstructure:"DLIST"`
	FlooringDueDate *time.Time `mapstructure:"FLRDUE"`
	FlooringAmount  *float64   `mapstructure:"FLRAMT"`
	RentalStartDate *time.Time `mapstructure:"RENTDT"`
	RentalRevenue   *float64   `mapstructure:"RENTRV"`
	RentalCost      *float64   `mapstructure:"RENTCS"`
	SoldToName      *string    `mapstructure:"TONAME"`
	SoldToAddress   *string    `mapstructure:"TOADRS"`
	SoldToCity      *string    `mapstructure:"TOCITY"`
	SoldToZip       *string    `mapstructure:"TOZIP"`
	PhoneNumber     *string    `mapstructure:"PHONE"`
}

func (Unit) GetAccount

func (u Unit) GetAccount() string

func (Unit) GetColor

func (u Unit) GetColor() *string

func (Unit) GetCost

func (u Unit) GetCost() float64

func (Unit) GetCreatedAt

func (u Unit) GetCreatedAt() time.Time

func (Unit) GetDealerList

func (u Unit) GetDealerList() *float64

func (Unit) GetDescription

func (u Unit) GetDescription() string

func (Unit) GetEngine

func (u Unit) GetEngine() *string

func (Unit) GetEngineHours

func (u Unit) GetEngineHours() *float64

func (Unit) GetFlooringAmount

func (u Unit) GetFlooringAmount() *float64

func (Unit) GetFlooringDueDate

func (u Unit) GetFlooringDueDate() *time.Time

func (Unit) GetGLAccount

func (u Unit) GetGLAccount() *string

func (Unit) GetHorsePower

func (u Unit) GetHorsePower() *int

func (Unit) GetInvoiceNumber

func (u Unit) GetInvoiceNumber() *string

func (Unit) GetIsNew

func (u Unit) GetIsNew() bool

func (Unit) GetLocation

func (u Unit) GetLocation() string

func (Unit) GetMake

func (u Unit) GetMake() string

func (Unit) GetModel

func (u Unit) GetModel() string

func (Unit) GetPhoneNumber

func (u Unit) GetPhoneNumber() *string

func (Unit) GetProductCode

func (u Unit) GetProductCode() *string

func (Unit) GetRentalCost

func (u Unit) GetRentalCost() *float64

func (Unit) GetRentalRevenue

func (u Unit) GetRentalRevenue() *float64

func (Unit) GetRentalStartDate

func (u Unit) GetRentalStartDate() *time.Time

func (Unit) GetRevenueAmount

func (u Unit) GetRevenueAmount() *float64

func (Unit) GetSerial

func (u Unit) GetSerial() *string

func (Unit) GetSoldAccount

func (u Unit) GetSoldAccount() *string

func (Unit) GetSoldAt

func (u Unit) GetSoldAt() *time.Time

func (Unit) GetSoldBy

func (u Unit) GetSoldBy() *string

func (Unit) GetSoldByName

func (u Unit) GetSoldByName() *string

func (Unit) GetSoldTo

func (u Unit) GetSoldTo() *string

func (Unit) GetSoldToAddress

func (u Unit) GetSoldToAddress() *string

func (Unit) GetSoldToCity

func (u Unit) GetSoldToCity() *string

func (Unit) GetSoldToName

func (u Unit) GetSoldToName() *string

func (Unit) GetSoldToZip

func (u Unit) GetSoldToZip() *string

func (Unit) GetStatus

func (u Unit) GetStatus() string

func (Unit) GetSuggestedList

func (u Unit) GetSuggestedList() *float64

func (Unit) GetTradedOnUnit

func (u Unit) GetTradedOnUnit() *string

func (Unit) GetUnitID

func (u Unit) GetUnitID() string

func (Unit) GetWarrantyCode

func (u Unit) GetWarrantyCode() *string

func (Unit) GetYear

func (u Unit) GetYear() string

func (Unit) ToUnitSpec

func (u Unit) ToUnitSpec() *types.UnitSpec

type UnitRepository

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

func NewUnitRepository

func NewUnitRepository(d database.DB) *UnitRepository

func (*UnitRepository) GetByUnitNumber

func (repo *UnitRepository) GetByUnitNumber(ctx context.Context, unitNum string) (Model, error)

func (*UnitRepository) ListUnits

func (repo *UnitRepository) ListUnits(ctx context.Context, lp types.ListParams) ([]Unit, error)

type UnitService

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

func NewUnitService

func NewUnitService(d database.DB) *UnitService

func (*UnitService) GetByUnitNumber

func (u *UnitService) GetByUnitNumber(ctx context.Context, unitNum string) (*types.UnitSpec, error)

func (*UnitService) ListUnits

func (u *UnitService) ListUnits(ctx context.Context, lp types.ListParams) ([]*types.UnitSpec, error)

ListUnits fetches a list of units based on ListParams and returns their specs.

Jump to

Keyboard shortcuts

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