Documentation
¶
Index ¶
- type Model
- type Unit
- func (u Unit) GetAccount() string
- func (u Unit) GetColor() *string
- func (u Unit) GetCost() float64
- func (u Unit) GetCreatedAt() time.Time
- func (u Unit) GetDealerList() *float64
- func (u Unit) GetDescription() string
- func (u Unit) GetEngine() *string
- func (u Unit) GetEngineHours() *float64
- func (u Unit) GetFlooringAmount() *float64
- func (u Unit) GetFlooringDueDate() *time.Time
- func (u Unit) GetGLAccount() *string
- func (u Unit) GetHorsePower() *int
- func (u Unit) GetInvoiceNumber() *string
- func (u Unit) GetIsNew() bool
- func (u Unit) GetLocation() string
- func (u Unit) GetMake() string
- func (u Unit) GetModel() string
- func (u Unit) GetPhoneNumber() *string
- func (u Unit) GetProductCode() *string
- func (u Unit) GetRentalCost() *float64
- func (u Unit) GetRentalRevenue() *float64
- func (u Unit) GetRentalStartDate() *time.Time
- func (u Unit) GetRevenueAmount() *float64
- func (u Unit) GetSerial() *string
- func (u Unit) GetSoldAccount() *string
- func (u Unit) GetSoldAt() *time.Time
- func (u Unit) GetSoldBy() *string
- func (u Unit) GetSoldByName() *string
- func (u Unit) GetSoldTo() *string
- func (u Unit) GetSoldToAddress() *string
- func (u Unit) GetSoldToCity() *string
- func (u Unit) GetSoldToName() *string
- func (u Unit) GetSoldToZip() *string
- func (u Unit) GetStatus() string
- func (u Unit) GetSuggestedList() *float64
- func (u Unit) GetTradedOnUnit() *string
- func (u Unit) GetUnitID() string
- func (u Unit) GetWarrantyCode() *string
- func (u Unit) GetYear() string
- func (u Unit) ToUnitSpec() *types.UnitSpec
- type UnitRepository
- type UnitService
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 (Unit) GetCreatedAt ¶
func (Unit) GetDealerList ¶
func (Unit) GetDescription ¶
func (Unit) GetEngineHours ¶
func (Unit) GetFlooringAmount ¶
func (Unit) GetFlooringDueDate ¶
func (Unit) GetGLAccount ¶
func (Unit) GetHorsePower ¶
func (Unit) GetInvoiceNumber ¶
func (Unit) GetLocation ¶
func (Unit) GetPhoneNumber ¶
func (Unit) GetProductCode ¶
func (Unit) GetRentalCost ¶
func (Unit) GetRentalRevenue ¶
func (Unit) GetRentalStartDate ¶
func (Unit) GetRevenueAmount ¶
func (Unit) GetSoldAccount ¶
func (Unit) GetSoldByName ¶
func (Unit) GetSoldToAddress ¶
func (Unit) GetSoldToCity ¶
func (Unit) GetSoldToName ¶
func (Unit) GetSoldToZip ¶
func (Unit) GetSuggestedList ¶
func (Unit) GetTradedOnUnit ¶
func (Unit) GetWarrantyCode ¶
func (Unit) ToUnitSpec ¶
type UnitRepository ¶
type UnitRepository struct {
// contains filtered or unexported fields
}
func NewUnitRepository ¶
func NewUnitRepository(d database.DB) *UnitRepository
func (*UnitRepository) GetByUnitNumber ¶
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 (*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.
Click to show internal directories.
Click to hide internal directories.