Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PartInventory ¶
type PartInventory struct {
Division string `mapstructure:"PIMDIV"`
VendorCode string `mapstructure:"PIMVEN"`
PartNumber string `mapstructure:"PIMPRT"`
Description string `mapstructure:"PIMDES"`
BinLocation string `mapstructure:"PIMBIN"`
QuickCode string `mapstructure:"PIMQKC"`
ItemClass string `mapstructure:"PIMCLS"`
ActiveFlag string `mapstructure:"PIMACT"`
TaxCode string `mapstructure:"PIMTAX"`
DateAddedYYYYMM int32 `mapstructure:"PIMDAD"`
DateLastCountYYYYMM int32 `mapstructure:"PIMDLC"`
DateLastSaleYYYYMM int32 `mapstructure:"PIMDLS"`
UnitWeight float64 `mapstructure:"PIMWHT"`
BackorderFlag string `mapstructure:"PIMQBK"`
PackQty int32 `mapstructure:"PIMPKG"`
OrderMultiplier int32 `mapstructure:"PIMMUL"`
JobCode int32 `mapstructure:"PIMJOB"`
OnHandQty int32 `mapstructure:"PIMONH"`
ReservedSA int32 `mapstructure:"PIMRSA"`
ReservedWO int32 `mapstructure:"PIMRWO"`
AvailableQty int32 `mapstructure:"PIMAVL"`
ReturnableFlag string `mapstructure:"PIMRET"`
DateLastPriceUpdate int32 `mapstructure:"PIMPUP"`
AvgCost float64 `mapstructure:"PIMAVG"`
Price1Basis string `mapstructure:"PIMCBS"`
Price1Value float64 `mapstructure:"PIMCVA"`
Price2Basis string `mapstructure:"PIMIBS"`
Price2Value float64 `mapstructure:"PIMIVA"`
Price3Basis string `mapstructure:"PIMSBS"`
Price3Value float64 `mapstructure:"PIMSVA"`
Price4Basis string `mapstructure:"PIMLBS"`
Price4Value float64 `mapstructure:"PIMLVA"`
DeliverCode string `mapstructure:"PIMDLV"`
OrderCode string `mapstructure:"PIMORC"`
MinQty int32 `mapstructure:"PIMMIN"`
MaxQty int32 `mapstructure:"PIMMAX"`
OrderQty int32 `mapstructure:"PIMODQ"`
LastReceiptDate int32 `mapstructure:"PIMLRD"`
LastReceiptQty int32 `mapstructure:"PIMLRQ"`
StockFlag string `mapstructure:"PIMSTK"`
OpenOnSales int32 `mapstructure:"PIMOOS"`
OpenOnPO int32 `mapstructure:"PIMOOP"`
OpenOnRO int32 `mapstructure:"PIMOOR"`
OpenOnReq int32 `mapstructure:"PIMOOA"`
Peak12MoUsage int32 `mapstructure:"PIMHYM"`
Comment string `mapstructure:"PIMCMT"`
CycleCountCode string `mapstructure:"PIMCCD"`
CorePartNumber string `mapstructure:"PIMCOR"`
CoreQty int32 `mapstructure:"PIMCQT"`
CorePrice float64 `mapstructure:"PIMCPR"`
Sup1Vendor string `mapstructure:"PIMSSV"`
Sup1Part string `mapstructure:"PIMSS#"`
Sup1Price float64 `mapstructure:"PIMSSP"`
Sup2Vendor string `mapstructure:"PIMS2V"`
Sup2Part string `mapstructure:"PIMS2#"`
Sup2Price float64 `mapstructure:"PIMS2P"`
Sup3Vendor string `mapstructure:"PIMS3V"`
Sup3Part string `mapstructure:"PIMS3#"`
Sup3Price float64 `mapstructure:"PIMS3P"`
RebuildIndicator string `mapstructure:"PIMRBI"`
RebuildVendor string `mapstructure:"PIMRBV"`
RebuildPart string `mapstructure:"PIMRB#"`
RebuildQtyFactor int32 `mapstructure:"PIMRBQ"`
PriceScheduleCode string `mapstructure:"PIMPSO"`
AutoPricingRule string `mapstructure:"PIMAPR"`
AutoPricingClass string `mapstructure:"PIMAPC"`
AutoPricingSource string `mapstructure:"PIMAPS"`
AutoPricingQtyBrk int32 `mapstructure:"PIMAPQ"`
AltAvailQty float64 `mapstructure:"PIMAVB"`
AltOnHandQty float64 `mapstructure:"PIMONB"`
AltUomUnits int32 `mapstructure:"PIM9UN"`
AltUomCode string `mapstructure:"PIM9UD"`
AltUomMultiple int32 `mapstructure:"PIM9UM"`
AltUomBackorderFlg string `mapstructure:"PIM9BL"`
AltUomFreightFlg string `mapstructure:"PIM9FR"`
Message1 int32 `mapstructure:"PIMSG1"`
Message2 int32 `mapstructure:"PIMSG2"`
Message3 int32 `mapstructure:"PIMSG3"`
Remaining map[string]interface{} `mapstructure:",remain"`
}
PartInventory mirrors the AS/400 parts master row and exposes helpers to translate it into exported specs.
func (*PartInventory) ToPartInventorySpec ¶
func (p *PartInventory) ToPartInventorySpec() *types.PartInventorySpec
ToPartInventorySpec converts the repository model into an exported spec.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository encapsulates SQL used to fetch DIS part inventory rows.
func NewRepository ¶
func NewRepository(db database.DB) *Repository
func (*Repository) GetPart ¶
func (r *Repository) GetPart(ctx context.Context, division, partNumber string) (*PartInventory, error)
func (*Repository) ListParts ¶
func (r *Repository) ListParts(ctx context.Context, lp types.ListParams) ([]PartInventory, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service exposes the typed parts inventory helpers.
func NewService ¶
func (*Service) ListParts ¶
func (s *Service) ListParts(ctx context.Context, lp types.ListParams) ([]*types.PartInventorySpec, error)
Click to show internal directories.
Click to hide internal directories.