models

package
v0.0.0-...-fdfe12d Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LineOfAccountingHouseholdGoodsCodeCivilian string = "HC"
	LineOfAccountingHouseholdGoodsCodeEnlisted string = "HE"
	LineOfAccountingHouseholdGoodsCodeOfficer  string = "HO"
	LineOfAccountingHouseholdGoodsCodeOther    string = "HT"
	LineOfAccountingHouseholdGoodsCodeDual     string = "HD"
	LineOfAccountingHouseholdGoodsCodeNTS      string = "HS"
)
View Source
const (
	// MoveStatusDRAFT captures enum value "DRAFT"
	MoveStatusDRAFT MoveStatus = "DRAFT"
	// MoveStatusSUBMITTED captures enum value "SUBMITTED"
	MoveStatusSUBMITTED MoveStatus = "SUBMITTED"
	// MoveStatusAPPROVED captures enum value "APPROVED"
	MoveStatusAPPROVED MoveStatus = "APPROVED"
	// MoveStatusCANCELED captures enum value "CANCELED"
	MoveStatusCANCELED MoveStatus = "CANCELED"
	// MoveStatusAPPROVALSREQUESTED captures enum value "APPROVALS REQUESTED"
	MoveStatusAPPROVALSREQUESTED MoveStatus = "APPROVALS REQUESTED"
	// MoveStatusNeedsServiceCounseling captures enum value "NEEDS SERVICE COUNSELING"
	MoveStatusNeedsServiceCounseling MoveStatus = "NEEDS SERVICE COUNSELING"
	// MoveStatusServiceCounselingCompleted captures enum value "SERVICE COUNSELING COMPLETED"
	MoveStatusServiceCounselingCompleted MoveStatus = "SERVICE COUNSELING COMPLETED"
	// MovePPMTypeFULL captures enum value "FULL"
	MovePPMTypeFULL string = "FULL"
	// MovePPMTypePARTIAL captures enum value "PARTIAL"
	MovePPMTypePARTIAL string = "PARTIAL"
)
View Source
const (
	// NTSRaw is the raw string value of the NTS Shipment Type
	NTSRaw = "HHG_INTO_NTS_DOMESTIC"
	// NTSrRaw is the raw string value of the NTSr Shipment Type
	NTSrRaw = "HHG_OUTOF_NTS_DOMESTIC"
)

using these also in move.go selected move type

View Source
const (
	// QueuePaymentRequestPaymentRequested status payment requested
	QueuePaymentRequestPaymentRequested = "Payment requested"
	// QueuePaymentRequestReviewed status Payment request reviewed
	QueuePaymentRequestReviewed = "Reviewed"
	// QueuePaymentRequestRejected status Payment request rejected
	QueuePaymentRequestRejected = "Rejected"
	// QueuePaymentRequestPaid status PaymentRequest paid
	QueuePaymentRequestPaid = "Paid"
	// QueuePaymentRequestDeprecated status PaymentRequest deprecated
	QueuePaymentRequestDeprecated = "Deprecated"
	// QueuePaymentRequestError status PaymentRequest error
	QueuePaymentRequestError = "Error"
)
View Source
const (
	// ServiceMemberGradeE1 captures enum value "E_1"
	ServiceMemberGradeE1 internalmessages.OrderPayGrade = "E_1"
	// ServiceMemberGradeE2 captures enum value "E_2"
	ServiceMemberGradeE2 internalmessages.OrderPayGrade = "E_2"
	// ServiceMemberGradeE3 captures enum value "E_3"
	ServiceMemberGradeE3 internalmessages.OrderPayGrade = "E_3"
	// ServiceMemberGradeE4 captures enum value "E_4"
	ServiceMemberGradeE4 internalmessages.OrderPayGrade = "E_4"
	// ServiceMemberGradeE5 captures enum value "E_5"
	ServiceMemberGradeE5 internalmessages.OrderPayGrade = "E_5"
	// ServiceMemberGradeE6 captures enum value "E_6"
	ServiceMemberGradeE6 internalmessages.OrderPayGrade = "E_6"
	// ServiceMemberGradeE7 captures enum value "E_7"
	ServiceMemberGradeE7 internalmessages.OrderPayGrade = "E_7"
	// ServiceMemberGradeE8 captures enum value "E_8"
	ServiceMemberGradeE8 internalmessages.OrderPayGrade = "E_8"
	// ServiceMemberGradeE9 captures enum value "E_9"
	ServiceMemberGradeE9 internalmessages.OrderPayGrade = "E_9"
	// ServiceMemberGradeE9SPECIALSENIORENLISTED captures enum value "E_9_SPECIAL_SENIOR_ENLISTED"
	ServiceMemberGradeE9SPECIALSENIORENLISTED internalmessages.OrderPayGrade = "E_9_SPECIAL_SENIOR_ENLISTED"
	// ServiceMemberGradeO1ACADEMYGRADUATE captures enum value "O_1_ACADEMY_GRADUATE"
	ServiceMemberGradeO1ACADEMYGRADUATE internalmessages.OrderPayGrade = "O_1_ACADEMY_GRADUATE"
	// ServiceMemberGradeO2 captures enum value "O_2"
	ServiceMemberGradeO2 internalmessages.OrderPayGrade = "O_2"
	// ServiceMemberGradeO3 captures enum value "O_3"
	ServiceMemberGradeO3 internalmessages.OrderPayGrade = "O_3"
	// ServiceMemberGradeO4 captures enum value "O_4"
	ServiceMemberGradeO4 internalmessages.OrderPayGrade = "O_4"
	// ServiceMemberGradeO5 captures enum value "O_5"
	ServiceMemberGradeO5 internalmessages.OrderPayGrade = "O_5"
	// ServiceMemberGradeO6 captures enum value "O_6"
	ServiceMemberGradeO6 internalmessages.OrderPayGrade = "O_6"
	// ServiceMemberGradeO7 captures enum value "O_7"
	ServiceMemberGradeO7 internalmessages.OrderPayGrade = "O_7"
	// ServiceMemberGradeO8 captures enum value "O_8"
	ServiceMemberGradeO8 internalmessages.OrderPayGrade = "O_8"
	// ServiceMemberGradeO9 captures enum value "O_9"
	ServiceMemberGradeO9 internalmessages.OrderPayGrade = "O_9"
	// ServiceMemberGradeO10 captures enum value "O_10"
	ServiceMemberGradeO10 internalmessages.OrderPayGrade = "O_10"
	// ServiceMemberGradeW1 captures enum value "W_1"
	ServiceMemberGradeW1 internalmessages.OrderPayGrade = "W_1"
	// ServiceMemberGradeW2 captures enum value "W_2"
	ServiceMemberGradeW2 internalmessages.OrderPayGrade = "W_2"
	// ServiceMemberGradeW3 captures enum value "W_3"
	ServiceMemberGradeW3 internalmessages.OrderPayGrade = "W_3"
	// ServiceMemberGradeW4 captures enum value "W_4"
	ServiceMemberGradeW4 internalmessages.OrderPayGrade = "W_4"
	// ServiceMemberGradeW5 captures enum value "W_5"
	ServiceMemberGradeW5 internalmessages.OrderPayGrade = "W_5"
	// ServiceMemberGradeAVIATIONCADET captures enum value "AVIATION_CADET"
	ServiceMemberGradeAVIATIONCADET internalmessages.OrderPayGrade = "AVIATION_CADET"
	// ServiceMemberGradeCIVILIANEMPLOYEE captures enum value "CIVILIAN_EMPLOYEE"
	ServiceMemberGradeCIVILIANEMPLOYEE internalmessages.OrderPayGrade = "CIVILIAN_EMPLOYEE"
	// ServiceMemberGradeACADEMYCADET captures enum value "ACADEMY_CADET"
	ServiceMemberGradeACADEMYCADET internalmessages.OrderPayGrade = "ACADEMY_CADET"
	// ServiceMemberGradeMIDSHIPMAN captures enum value "MIDSHIPMAN"
	ServiceMemberGradeMIDSHIPMAN internalmessages.OrderPayGrade = "MIDSHIPMAN"
)
View Source
const (
	// DefaultServiceMemberSITDaysAllowance is the default number of SIT days a service member is allowed
	DefaultServiceMemberSITDaysAllowance = 90
)

These are meant to be the default number of SIT days that a customer is allowed to have. They should be used when creating a shipment and setting the initial value. Other values will likely be added to this once we deal with different types of customers.

View Source
const InstructionsAfterContractNumber string = "Attachment 1 Performance Work Statement"
View Source
const InstructionsBeforeContractNumber string = "Packaging, packing, and shipping instructions as identified in the Conformed Copy of"
View Source
const MethodOfPayment string = "Payment will be made using the Third-Party Payment System (TPPS) Automated Payment System"
View Source
const NAICS string = "488510 - FREIGHT TRANSPORTATION ARRANGEMENT"
View Source
const PoundsPackedPerDay = 5000

PoundsPackedPerDay represents the number of pounds that can be packed in a single day.

View Source
const RecordNotFoundErrorString = "sql: no rows in result set"

RecordNotFoundErrorString is the error string returned when no matching rows exist in the database This is ugly, but the best we can do with go's Postgresql adapter

View Source
const SupplyAndServicesCostEstimate string = "" /* 315-byte string literal not displayed */
View Source
const UniqueConstraintViolationOfficeUserEdipiErrorString = "pq: duplicate key value violates unique constraint \"office_users_edipi_key\""

This is for when the office user edipi unique idx constraint is hit

View Source
const UniqueConstraintViolationOfficeUserEmailErrorString = "pq: duplicate key value violates unique constraint \"office_users_email_idx\""

This is for when the office user email unique idx constraint is hit

View Source
const UniqueConstraintViolationOfficeUserOtherUniqueIDErrorString = "pq: duplicate key value violates unique constraint \"office_users_other_unique_id_key\""

This is for when the office user other unique id unique idx constraint is hit

View Source
const UploadedOrdersDocumentName = "uploaded_orders"

UploadedOrdersDocumentName is the name of an uploaded orders document

Variables

AllowedBoatShipmentTypees is a list of all the allowed values for the Type of a BoatShipment as strings. Needed for validation.

AllowedPPMAdvanceStatuses is a list of all the allowed values for AdvanceStatus on a PPMShipment, as strings. Needed for validation.

AllowedPPMDocumentStatuses is a list of all the allowed values for the Status of a PPMShipment's documents, as strings. Needed for validation.

AllowedPPMShipmentStatuses is a list of all the allowed values for the Status of a PPMShipment as strings. Needed for validation.

AllowedSITLocationTypes is a list of all the allowed values for SITLocationType on a PPMShipment, as strings. Needed for validation.

View Source
var ErrCreateViolatesUniqueConstraint = errors.New("CREATE_VIOLATES_UNIQUE")

ErrCreateViolatesUniqueConstraint is returned if you call create and violate a unique constraint.

View Source
var ErrDestroyForbidden = errors.New("DESTROY_FORBIDDEN")

ErrDestroyForbidden means that a model cannot be destroyed in its current state

View Source
var ErrFetchForbidden = errors.New("FETCH_FORBIDDEN")

ErrFetchForbidden means that the record exists but that the user does not have access to it

View Source
var ErrFetchNotFound = errors.New("FETCH_NOT_FOUND")

ErrFetchNotFound means that the requested record does not exist

View Source
var ErrInvalidMoveID = errors.New("INVALID_MOVE_ID")

ErrInvalidMoveID is used if a argument is provided in cases where a move ID is provided, but may be malformed, empty, or nonexistent

View Source
var ErrInvalidPatchGate = errors.New("INVALID_PATCH_GATE")

ErrInvalidPatchGate means that an attempt to patch a model was not given the correct set of fields

View Source
var ErrInvalidTransition = errors.New("INVALID_TRANSITION")

ErrInvalidTransition is an error representing an invalid state transition.

View Source
var ErrLocatorGeneration = errors.New("LOCATOR_ERRORS")

ErrLocatorGeneration means that we got errors generating the Locator

View Source
var ErrUserUnauthorized = errors.New("USER_UNAUTHORIZED")

ErrUserUnauthorized means that the user is not authorized to access a record

View Source
var ErrWriteConflict = errors.New("WRITE_CONFLICT")

ErrWriteConflict means that the record creation or update cannot be completed due to a conflict with other records

View Source
var ErrWriteForbidden = errors.New("WRITE_FORBIDDEN")

ErrWriteForbidden means that user is not permitted to write the record

Definition of valid Domestic Destination SIT ReServiceCodes

Definition of valid Domestic Origin SIT ReServiceCodes

View Source
var ValidInternationalDestinationSITReServiceCodes = []ReServiceCode{
	ReServiceCodeIDASIT,
	ReServiceCodeIDDSIT,
	ReServiceCodeIDFSIT,
	ReServiceCodeIDSHUT,
}

Definition of valid International Destination SIT ReServiceCodes

Definition of valid International Origin SIT ReServiceCodes

View Source
var ValidServiceItemParamNameStrings = []string{
	string(ServiceItemParamNameActualPickupDate),
	string(ServiceItemParamNameContractCode),
	string(ServiceItemParamNameContractYearName),
	string(ServiceItemParamNameCubicFeetBilled),
	string(ServiceItemParamNameCubicFeetCrating),
	string(ServiceItemParamNameDimensionHeight),
	string(ServiceItemParamNameDimensionLength),
	string(ServiceItemParamNameDimensionWidth),
	string(ServiceItemParamNameDistanceZip),
	string(ServiceItemParamNameDistanceZipSITDest),
	string(ServiceItemParamNameDistanceZipSITOrigin),
	string(ServiceItemParamNameEIAFuelPrice),
	string(ServiceItemParamNameEscalationCompounded),
	string(ServiceItemParamNameFSCMultiplier),
	string(ServiceItemParamNameFSCPriceDifferenceInCents),
	string(ServiceItemParamNameFSCWeightBasedDistanceMultiplier),
	string(ServiceItemParamNameIsPeak),
	string(ServiceItemParamNameMarketDest),
	string(ServiceItemParamNameMarketOrigin),
	string(ServiceItemParamNameMTOAvailableToPrimeAt),
	string(ServiceItemParamNameNTSPackingFactor),
	string(ServiceItemParamNameNumberDaysSIT),
	string(ServiceItemParamNamePriceAreaDest),
	string(ServiceItemParamNamePriceAreaIntlDest),
	string(ServiceItemParamNamePriceAreaIntlOrigin),
	string(ServiceItemParamNamePriceAreaOrigin),
	string(ServiceItemParamNamePriceRateOrFactor),
	string(ServiceItemParamNamePSILinehaulDom),
	string(ServiceItemParamNamePSILinehaulDomPrice),
	string(ServiceItemParamNamePSILinehaulShort),
	string(ServiceItemParamNamePSILinehaulShortPrice),
	string(ServiceItemParamNamePSIPriceDomDest),
	string(ServiceItemParamNamePSIPriceDomDestPrice),
	string(ServiceItemParamNamePSIPriceDomOrigin),
	string(ServiceItemParamNamePSIPriceDomOriginPrice),
	string(ServiceItemParamNamePSIShippingLinehaulIntlCO),
	string(ServiceItemParamNamePSIShippingLinehaulIntlCOPrice),
	string(ServiceItemParamNamePSIShippingLinehaulIntlOC),
	string(ServiceItemParamNamePSIShippingLinehaulIntlOCPrice),
	string(ServiceItemParamNamePSIShippingLinehaulIntlOO),
	string(ServiceItemParamNamePSIShippingLinehaulIntlOOPrice),
	string(ServiceItemParamNameRateAreaNonStdDest),
	string(ServiceItemParamNameRateAreaNonStdOrigin),
	string(ServiceItemParamNameReferenceDate),
	string(ServiceItemParamNameRequestedPickupDate),
	string(ServiceItemParamNameServiceAreaDest),
	string(ServiceItemParamNameServiceAreaOrigin),
	string(ServiceItemParamNameServicesScheduleDest),
	string(ServiceItemParamNameServicesScheduleOrigin),
	string(ServiceItemParamNameSITPaymentRequestEnd),
	string(ServiceItemParamNameSITPaymentRequestStart),
	string(ServiceItemParamNameSITScheduleDest),
	string(ServiceItemParamNameSITScheduleOrigin),
	string(ServiceItemParamNameSITServiceAreaDest),
	string(ServiceItemParamNameSITServiceAreaOrigin),
	string(ServiceItemParamNameWeightAdjusted),
	string(ServiceItemParamNameWeightBilled),
	string(ServiceItemParamNameWeightEstimated),
	string(ServiceItemParamNameWeightOriginal),
	string(ServiceItemParamNameWeightReweigh),
	string(ServiceItemParamNameZipDestAddress),
	string(ServiceItemParamNameZipPickupAddress),
	string(ServiceItemParamNameZipSITDestHHGFinalAddress),
	string(ServiceItemParamNameZipSITDestHHGOriginalAddress),
	string(ServiceItemParamNameZipSITOriginHHGActualAddress),
	string(ServiceItemParamNameZipSITOriginHHGOriginalAddress),
	string(ServiceItemParamNameStandaloneCrate),
	string(ServiceItemParamNameStandaloneCrateCap),
	string(ServiceItemParamNameUncappedRequestTotal),
}

ValidServiceItemParamNameStrings lists all valid service item param key names

View Source
var ValidServiceItemParamNames = []ServiceItemParamName{
	ServiceItemParamNameActualPickupDate,
	ServiceItemParamNameContractCode,
	ServiceItemParamNameContractYearName,
	ServiceItemParamNameCubicFeetBilled,
	ServiceItemParamNameCubicFeetCrating,
	ServiceItemParamNameDimensionHeight,
	ServiceItemParamNameDimensionLength,
	ServiceItemParamNameDimensionWidth,
	ServiceItemParamNameDistanceZip,
	ServiceItemParamNameDistanceZipSITDest,
	ServiceItemParamNameDistanceZipSITOrigin,
	ServiceItemParamNameEIAFuelPrice,
	ServiceItemParamNameEscalationCompounded,
	ServiceItemParamNameFSCMultiplier,
	ServiceItemParamNameFSCPriceDifferenceInCents,
	ServiceItemParamNameFSCWeightBasedDistanceMultiplier,
	ServiceItemParamNameIsPeak,
	ServiceItemParamNameMarketDest,
	ServiceItemParamNameMarketOrigin,
	ServiceItemParamNameMTOAvailableToPrimeAt,
	ServiceItemParamNameNTSPackingFactor,
	ServiceItemParamNameNumberDaysSIT,
	ServiceItemParamNamePriceAreaDest,
	ServiceItemParamNamePriceAreaIntlDest,
	ServiceItemParamNamePriceAreaIntlOrigin,
	ServiceItemParamNamePriceAreaOrigin,
	ServiceItemParamNamePriceRateOrFactor,
	ServiceItemParamNamePSILinehaulDom,
	ServiceItemParamNamePSILinehaulDomPrice,
	ServiceItemParamNamePSILinehaulShort,
	ServiceItemParamNamePSILinehaulShortPrice,
	ServiceItemParamNamePSIPriceDomDest,
	ServiceItemParamNamePSIPriceDomDestPrice,
	ServiceItemParamNamePSIPriceDomOrigin,
	ServiceItemParamNamePSIPriceDomOriginPrice,
	ServiceItemParamNamePSIShippingLinehaulIntlCO,
	ServiceItemParamNamePSIShippingLinehaulIntlCOPrice,
	ServiceItemParamNamePSIShippingLinehaulIntlOC,
	ServiceItemParamNamePSIShippingLinehaulIntlOCPrice,
	ServiceItemParamNamePSIShippingLinehaulIntlOO,
	ServiceItemParamNamePSIShippingLinehaulIntlOOPrice,
	ServiceItemParamNameRateAreaNonStdDest,
	ServiceItemParamNameRateAreaNonStdOrigin,
	ServiceItemParamNameReferenceDate,
	ServiceItemParamNameRequestedPickupDate,
	ServiceItemParamNameServiceAreaDest,
	ServiceItemParamNameServiceAreaOrigin,
	ServiceItemParamNameServicesScheduleDest,
	ServiceItemParamNameServicesScheduleOrigin,
	ServiceItemParamNameSITPaymentRequestEnd,
	ServiceItemParamNameSITPaymentRequestStart,
	ServiceItemParamNameSITScheduleDest,
	ServiceItemParamNameSITScheduleOrigin,
	ServiceItemParamNameSITServiceAreaDest,
	ServiceItemParamNameSITServiceAreaOrigin,
	ServiceItemParamNameWeightAdjusted,
	ServiceItemParamNameWeightBilled,
	ServiceItemParamNameWeightEstimated,
	ServiceItemParamNameWeightOriginal,
	ServiceItemParamNameWeightReweigh,
	ServiceItemParamNameZipDestAddress,
	ServiceItemParamNameZipPickupAddress,
	ServiceItemParamNameZipSITDestHHGFinalAddress,
	ServiceItemParamNameZipSITDestHHGOriginalAddress,
	ServiceItemParamNameZipSITOriginHHGActualAddress,
	ServiceItemParamNameZipSITOriginHHGOriginalAddress,
	ServiceItemParamNameStandaloneCrate,
	ServiceItemParamNameStandaloneCrateCap,
	ServiceItemParamNameUncappedRequestTotal,
}

ValidServiceItemParamNames lists all valid service item param key names

ValidServiceItemParamOrigins lists all valid service item param origins

ValidServiceItemParamTypes lists all valid service item param types

Functions

func AllWeightAllotments

func AllWeightAllotments() map[internalmessages.OrderPayGrade]WeightAllotment

AllWeightAllotments returns all the weight allotments for each rank.

func BoolPointer

func BoolPointer(b bool) *bool

BoolPointer allows you to take the address of a bool literal. It is useful for initializing bool pointer fields in model construction

func CentPointer

func CentPointer(c unit.Cents) *unit.Cents

CentPointer allows you to get the pointer to a unit.Cent literal. It is useful for initializing unit.Cent pointer fields in model construction

func CreateElectronicOrder

func CreateElectronicOrder(dbConnection *pop.Connection, order *ElectronicOrder) (*validate.Errors, error)

CreateElectronicOrder inserts an empty set of electronic Orders into the database

func CreateElectronicOrderWithRevision

func CreateElectronicOrderWithRevision(dbConnection *pop.Connection, order *ElectronicOrder, firstRevision *ElectronicOrdersRevision) (*validate.Errors, error)

CreateElectronicOrderWithRevision inserts a new set of electronic Orders into the database with its first Revision

func DeletePrimeUpload

func DeletePrimeUpload(dbConn *pop.Connection, primeUpload *PrimeUpload) error

DeletePrimeUpload deletes an upload from the database

func DeleteServiceRequestDocumentUpload

func DeleteServiceRequestDocumentUpload(dbConn *pop.Connection, serviceRequestUpload *ServiceRequestDocumentUpload) error

DeleteServiceRequestDocumentUpload deletes an upload from the database

func DeleteUpload

func DeleteUpload(dbConn *pop.Connection, upload *Upload) error

DeleteUpload deletes an upload from the database

func DeleteUserUpload

func DeleteUserUpload(dbConn *pop.Connection, userUpload *UserUpload) error

DeleteUserUpload deletes an upload from the database

func FindCountyByZipCode

func FindCountyByZipCode(db *pop.Connection, zipCode string) (string, error)

Find a corresponding county for a provided zip code from the USPRC table

func Float64Pointer

func Float64Pointer(i float64) *float64

Float64Pointer allows you to take the address of a float64 literal. It is useful for initializing float64 pointer fields in model construction

func GenerateLocator

func GenerateLocator() string

GenerateLocator constructs a record locator - a unique 6 character alphanumeric string

func GenerateReferenceID

func GenerateReferenceID(db *pop.Connection) (string, error)

GenerateReferenceID generates a reference ID for the MTO

func GenerateSafetyMoveLocator

func GenerateSafetyMoveLocator(db *pop.Connection) string

GenerateSafetyMoveLocator constructs a record locator - a unique 6 character alphanumeric string starting with SM

func GetAddressID

func GetAddressID(address *Address) *uuid.UUID

GetAddressID facilitates grabbing the ID from an address that may be nil

func GetPPMNetWeight

func GetPPMNetWeight(ppm PPMShipment) unit.Pound

func GetTotalNetWeightForMove

func GetTotalNetWeightForMove(m Move) unit.Pound

func GetWeightTicketNetWeight

func GetWeightTicketNetWeight(w WeightTicket) unit.Pound

func Int32Pointer

func Int32Pointer(i int32) *int32

Int32Pointer allows you to take the address of a int32 literal. It is useful for initializing int32 pointer fields in model construction

func Int64Pointer

func Int64Pointer(i int64) *int64

Int64Pointer allows you to take the address of a int64 literal. It is useful for initializing int64 pointer fields in model construction

func IntPointer

func IntPointer(i int) *int

IntPointer allows you to take the address of a int literal. It is useful for initializing int pointer fields in model construction

func PackDays

func PackDays(weight unit.Pound) int

PackDays returns the number of days it will take to pack the given weight.

func PoundPointer

func PoundPointer(p unit.Pound) *unit.Pound

PoundPointer allows you to get the pointer to a unit.Pound literal. It is useful for initializing unit.Pound pointer fields in model construction

func SaveMoveDependencies

func SaveMoveDependencies(db *pop.Connection, move *Move) (*validate.Errors, error)

SaveMoveDependencies safely saves a Move status, ppms' advances' statuses, orders statuses, and shipment GBLOCs.

func SaveOrder

func SaveOrder(db *pop.Connection, order *Order) (*validate.Errors, error)

SaveOrder saves an order

func SaveServiceMember

func SaveServiceMember(appCtx appcontext.AppContext, serviceMember *ServiceMember) (*validate.Errors, error)

SaveServiceMember takes a serviceMember with Address structs and coordinates saving it all in a transaction

func StringPointer

func StringPointer(s string) *string

StringPointer allows you to take the address of a string literal. It is useful for initializing string pointer fields in model construction

func TimePointer

func TimePointer(t time.Time) *time.Time

TimePointer allows you to take the address of a time.Time literal. It is useful for initializing time.Time pointer fields in model construction

func TransitDays

func TransitDays(weight unit.Pound, miles int) (int, error)

TransitDays returns the number of days it will take to move the specified weight of goods the specified distance.

func UUIDPointer

func UUIDPointer(u uuid.UUID) *uuid.UUID

UUIDPointer allows you to get the pointer to a uuid.UUID literal. It is useful for initializing uuid.UUID pointer fields in model construction

func UpdateServiceMemberDoDID

func UpdateServiceMemberDoDID(db *pop.Connection, serviceMember *ServiceMember, dodid *string) error

UpdateServiceMemberDoDID is called if Safety Move order is created to clear out the DoDID

func UpdateServiceMemberEMPLID

func UpdateServiceMemberEMPLID(db *pop.Connection, serviceMember *ServiceMember, emplid *string) error

UpdateServiceMemberEMPLID is called if Safety Move order is created to clear out the EMPLID

func UpdateUserOktaID

func UpdateUserOktaID(db *pop.Connection, user *User, oktaID string) error

UpdateUserOktaID is called upon the first successful Okta verification of a new user

Types

type Address

type Address struct {
	ID             uuid.UUID `json:"id" db:"id"`
	CreatedAt      time.Time `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time `json:"updated_at" db:"updated_at"`
	StreetAddress1 string    `json:"street_address_1" db:"street_address_1"`
	StreetAddress2 *string   `json:"street_address_2" db:"street_address_2"`
	StreetAddress3 *string   `json:"street_address_3" db:"street_address_3"`
	City           string    `json:"city" db:"city"`
	State          string    `json:"state" db:"state"`
	PostalCode     string    `json:"postal_code" db:"postal_code"`
	Country        *string   `json:"country" db:"country"`
	County         string    `json:"county" db:"county"`
}

Address is an address

func FetchAddressByID

func FetchAddressByID(dbConnection *pop.Connection, id *uuid.UUID) *Address

FetchAddressByID returns an address model by ID

func (*Address) Copy

func (a *Address) Copy() *Address

Copy returns a pointer that is a copy of the original pointer Address

func (*Address) CountryCode

func (a *Address) CountryCode() (*string, error)

CountryCode returns 2-3 character code for country, returns nil if no Country TODO: since we only support CONUS at this time this just returns USA and otherwise throws a NotImplementedCountryCode

func (*Address) Format

func (a *Address) Format() string

Format returns the address in default US mailing address format

func (*Address) LineFormat

func (a *Address) LineFormat() string

LineFormat returns the address as a string, formatted into a single line

func (*Address) MarshalLogObject

func (a *Address) MarshalLogObject(encoder zapcore.ObjectEncoder) error

MarshalLogObject is required to be able to zap.Object log TDLs

func (Address) TableName

func (a Address) TableName() string

TableName overrides the table name used by Pop.

func (*Address) Validate

func (a *Address) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type AdminRole

type AdminRole string

AdminRole represents administrative roles

const (
	// SystemAdminRole represents a role for managing the system
	SystemAdminRole AdminRole = "SYSTEM_ADMIN"
	// ProgramAdminRole represents a role for managing the program (Note: This is deprecated and should be removed)
	ProgramAdminRole AdminRole = "PROGRAM_ADMIN"
)

func (*AdminRole) String

func (ar *AdminRole) String() string

String returns a string representation of the admin role

func (*AdminRole) ValidRoles

func (ar *AdminRole) ValidRoles() []AdminRole

ValidRoles returns a slice of valid roles for an admin

type AdminUser

type AdminUser struct {
	ID             uuid.UUID    `json:"id" db:"id"`
	CreatedAt      time.Time    `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time    `json:"updated_at" db:"updated_at"`
	UserID         *uuid.UUID   `json:"user_id" db:"user_id"`
	User           User         `belongs_to:"user" fk_id:"user_id"`
	Role           AdminRole    `json:"role" db:"role"`
	Email          string       `json:"email" db:"email"`
	FirstName      string       `json:"first_name" db:"first_name"`
	LastName       string       `json:"last_name" db:"last_name"`
	OrganizationID *uuid.UUID   `json:"organization_id" db:"organization_id"`
	Organization   Organization `belongs_to:"organization" fk_id:"organization_id"`
	Active         bool         `json:"active" db:"active"`
	Super          bool         `json:"super" db:"super"`
}

AdminUser is someone who operates the Milmove systems

func (AdminUser) String

func (a AdminUser) String() string

func (AdminUser) TableName

func (a AdminUser) TableName() string

TableName overrides the table name used by Pop.

func (*AdminUser) Validate

func (a *AdminUser) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type AdminUsers

type AdminUsers []AdminUser

func (AdminUsers) String

func (a AdminUsers) String() string

type AffiliationIsPresent

type AffiliationIsPresent struct {
	Name  string
	Field internalmessages.Affiliation
}

AffiliationIsPresent validates that a branch is present

func (*AffiliationIsPresent) IsValid

func (v *AffiliationIsPresent) IsValid(errors *validate.Errors)

IsValid adds an error if the string value is blank.

type AppealStatus

type AppealStatus string

AppealStatus represents the status of an appeal made by a GSR

const (
	AppealStatusSustained AppealStatus = "SUSTAINED"
	AppealStatusRejected  AppealStatus = "REJECTED"
)

func (AppealStatus) String

func (g AppealStatus) String() string

String is a string representation of a GSR Appeal Status

type ApplicationParameters

type ApplicationParameters struct {
	ID             uuid.UUID `json:"id" db:"id"`
	ValidationCode *string   `json:"validation_code" db:"validation_code"`
	ParameterName  *string   `json:"parameter_name" db:"parameter_name"`
	ParameterValue *string   `json:"parameter_value" db:"parameter_value"`
	CreatedAt      time.Time `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time `json:"updated_at" db:"updated_at"`
}

ApplicationParameters is a model representing application parameters and holds parameter values and parameter names stored in the database

func FetchParameterValue

func FetchParameterValue(db *pop.Connection, param string, value string) (ApplicationParameters, error)

FetchParameterValue returns a specific parameter value from the db

func FetchParameterValueByName

func FetchParameterValueByName(db *pop.Connection, param string) (ApplicationParameters, error)

FetchParameterValue returns a specific parameter value from the db

func (ApplicationParameters) TableName

func (a ApplicationParameters) TableName() string

type AtLeastOneNotNil

type AtLeastOneNotNil struct {
	FieldName1  string
	FieldValue1 *string
	FieldName2  string
	FieldValue2 *string
}

AtLeastOneNotNil validates that at least one of two fields are not nil

func (*AtLeastOneNotNil) IsValid

func (v *AtLeastOneNotNil) IsValid(errors *validate.Errors)

IsValid adds an error if fieldValue1 and fieldValue2 are nil

type AuditHistories

type AuditHistories []AuditHistory

type AuditHistory

type AuditHistory struct {
	ID uuid.UUID `json:"id" db:"id"`
	// Database schema audited table for this event is in
	SchemaName string `json:"schema_name" db:"schema_name"`
	// name of database table that was changed
	// Note: naming this "AuditedTable" instead of "TableName" in the struct so we can have a "TableName"
	// method as well on this struct to override the default Pop table name algorithm.  Go won't let
	// you have both.  Leaving the database column name and swagger field name the same for now.
	AuditedTable string `json:"table_name" db:"table_name"`
	// relation OID. Table OID (object identifier). Changes with drop/create
	RelID int64 `json:"rel_id" db:"relid"`
	// id column for the tableName where the data was changed
	ObjectID             *uuid.UUID `json:"object_id" db:"object_id"`
	SessionUserID        *uuid.UUID `json:"session_user_id" db:"session_userid"`
	SessionUserFirstName *string    `json:"session_user_first_name" db:"session_user_first_name"`
	SessionUserLastName  *string    `json:"session_user_last_name" db:"session_user_last_name"`
	SessionUserEmail     *string    `json:"session_user_email" db:"session_user_email"`
	SessionUserTelephone *string    `json:"session_user_telephone" db:"session_user_telephone"`
	Context              *string    `json:"context" db:"context"`
	ContextID            *string    `json:"context_id" db:"context_id"`
	// Identifier of transaction that made the change. May wrap, but unique paired with action_tstamp_tx
	TransactionID *int64 `json:"transaction_id" db:"transaction_id"`
	// Record the text of the client query that triggered the audit event
	ClientQuery *string `json:"client_query" db:"client_query"`
	// Action type; I = insert, D = delete, U = update, T = truncate
	Action string `json:"action" db:"action"`
	// API endpoint name that was called to make the change
	EventName   *string `json:"event_name" db:"event_name"`
	OldData     *string `json:"old_data" db:"old_data"`
	ChangedData *string `json:"changed_data" db:"changed_data"`
	// true if audit event is from an FOR EACH STATEMENT trigger, false for FOR EACH ROW'
	StatementOnly bool `json:"statement_only" db:"statement_only"`
	// Transaction start timestamp for tx in which audited event occurred
	ActionTstampTx time.Time `json:"action_tstamp_tx" db:"action_tstamp_tx"`
	// Statement start timestamp for tx in which audited event occurred
	ActionTstampStm time.Time `json:"action_tstamp_stm" db:"action_tstamp_stm"`
	// Wall clock time at which audited event's trigger call occurred
	ActionTstampClk time.Time `json:"action_tstamp_clk" db:"action_tstamp_clk"`
}

AuditHistory is a record from the audit_history table

func (AuditHistory) TableName

func (a AuditHistory) TableName() string

TableName overrides the table name used by Pop.

type BackupContact

type BackupContact struct {
	ID              uuid.UUID               `json:"id" db:"id"`
	CreatedAt       time.Time               `json:"created_at" db:"created_at"`
	UpdatedAt       time.Time               `json:"updated_at" db:"updated_at"`
	ServiceMemberID uuid.UUID               `json:"service_member_id" db:"service_member_id"`
	ServiceMember   ServiceMember           `belongs_to:"service_member" fk_id:"service_member_id"`
	Permission      BackupContactPermission `json:"permission" db:"permission"`
	Name            string                  `json:"name" db:"name"`
	Email           string                  `json:"email" db:"email"`
	Phone           *string                 `json:"phone" db:"phone"`
}

BackupContact is a model representing a backup contact for a service member

func FetchBackupContact

func FetchBackupContact(db *pop.Connection, session *auth.Session, id uuid.UUID) (BackupContact, error)

FetchBackupContact returns a specific backup contact model

func (BackupContact) TableName

func (b BackupContact) TableName() string

TableName overrides the table name used by Pop.

func (*BackupContact) Validate

func (b *BackupContact) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type BackupContactPermission

type BackupContactPermission string

BackupContactPermission represents the permissions granted to a backup contact

const (
	// BackupContactPermissionNONE captures enum value "NONE"
	BackupContactPermissionNONE BackupContactPermission = "NONE"
	// BackupContactPermissionVIEW captures enum value "VIEW"
	BackupContactPermissionVIEW BackupContactPermission = "VIEW"
	// BackupContactPermissionEDIT captures enum value "EDIT"
	BackupContactPermissionEDIT BackupContactPermission = "EDIT"
)

type BackupContacts

type BackupContacts []BackupContact

type BoatShipment

type BoatShipment struct {
	ID             uuid.UUID        `json:"id" db:"id"`
	ShipmentID     uuid.UUID        `json:"shipment_id" db:"shipment_id"`
	Shipment       MTOShipment      `belongs_to:"mto_shipments" fk_id:"shipment_id"`
	Type           BoatShipmentType `json:"type" db:"type"`
	CreatedAt      time.Time        `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time        `json:"updated_at" db:"updated_at"`
	DeletedAt      *time.Time       `json:"deleted_at" db:"deleted_at"`
	Year           *int             `json:"year" db:"year"`
	Make           *string          `json:"make" db:"make"`
	Model          *string          `json:"model" db:"model"`
	LengthInInches *int             `json:"length_in_inches" db:"length_in_inches"`
	WidthInInches  *int             `json:"width_in_inches" db:"width_in_inches"`
	HeightInInches *int             `json:"height_in_inches" db:"height_in_inches"`
	HasTrailer     *bool            `json:"has_trailer" db:"has_trailer"`
	IsRoadworthy   *bool            `json:"is_roadworthy" db:"is_roadworthy"`
}

BoatShipment is the portion of a move that a service member performs themselves

func FetchBoatShipmentByBoatShipmentID

func FetchBoatShipmentByBoatShipmentID(db *pop.Connection, boatShipmentID uuid.UUID) (*BoatShipment, error)

FetchBoatShipmentByBoatShipmentID returns a Boat Shipment for a given id

func (BoatShipment) TableName

func (b BoatShipment) TableName() string

TableName overrides the table name used by Pop.

func (BoatShipment) Validate

func (b BoatShipment) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This should contain validation that is for data integrity. Business validation should occur in service objects.

type BoatShipmentType

type BoatShipmentType string

BoatShipmentType represents the status of an order record's lifecycle

const (
	// BoatShipmentTypeHaulAway captures enum value "HAUL_AWAY"
	BoatShipmentTypeHaulAway BoatShipmentType = "HAUL_AWAY"
	// BoatShipmentTypeTowAway captures enum value "TOW_AWAY"
	BoatShipmentTypeTowAway BoatShipmentType = "TOW_AWAY"
)

type BoatShipments

type BoatShipments []BoatShipment

BoatShipments is a list of Boats

type CannotBeTrueIfFalse

type CannotBeTrueIfFalse struct {
	Name1  string
	Field1 bool
	Name2  string
	Field2 bool
}

CannotBeTrueIfFalse validates that field1 cannot be true while field2 is false

func (*CannotBeTrueIfFalse) IsValid

func (v *CannotBeTrueIfFalse) IsValid(errors *validate.Errors)

IsValid adds an error if field1 is true while field2 is false

type ClientCert

type ClientCert struct {
	ID                          uuid.UUID `json:"id" db:"id"`
	Sha256Digest                string    `db:"sha256_digest"`
	Subject                     string    `db:"subject"`
	AllowOrdersAPI              bool      `db:"allow_orders_api"`
	CreatedAt                   time.Time `db:"created_at"`
	UpdatedAt                   time.Time `db:"updated_at"`
	AllowAirForceOrdersRead     bool      `db:"allow_air_force_orders_read"`
	AllowAirForceOrdersWrite    bool      `db:"allow_air_force_orders_write"`
	AllowArmyOrdersRead         bool      `db:"allow_army_orders_read"`
	AllowArmyOrdersWrite        bool      `db:"allow_army_orders_write"`
	AllowCoastGuardOrdersRead   bool      `db:"allow_coast_guard_orders_read"`
	AllowCoastGuardOrdersWrite  bool      `db:"allow_coast_guard_orders_write"`
	AllowMarineCorpsOrdersRead  bool      `db:"allow_marine_corps_orders_read"`
	AllowMarineCorpsOrdersWrite bool      `db:"allow_marine_corps_orders_write"`
	AllowNavyOrdersRead         bool      `db:"allow_navy_orders_read"`
	AllowNavyOrdersWrite        bool      `db:"allow_navy_orders_write"`
	AllowPrime                  bool      `db:"allow_prime"`
	AllowPPTAS                  bool      `db:"allow_pptas"`
	UserID                      uuid.UUID `db:"user_id"`
}

ClientCert represents a known x509 Certificate in the database.

func FetchClientCert

func FetchClientCert(db *pop.Connection, sha256Digest string) (*ClientCert, error)

FetchClientCert fetches and validates a client certificate by digest

func (*ClientCert) GetAllowedOrdersIssuersRead

func (c *ClientCert) GetAllowedOrdersIssuersRead() []string

GetAllowedOrdersIssuersRead returns a slice with the issuers of Orders that this ClientCert is allowed to read

func (ClientCert) TableName

func (c ClientCert) TableName() string

TableName overrides the table name used by Pop.

func (*ClientCert) Validate

func (c *ClientCert) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ClientCerts

type ClientCerts []ClientCert

ClientCerts is not required by pop and may be deleted

type Contractor

type Contractor struct {
	ID             uuid.UUID `json:"id" db:"id"`
	Name           string    `json:"code" db:"name"`
	Type           string    `json:"type" db:"type"`
	ContractNumber string    `json:"contract_number" db:"contract_number"`
	CreatedAt      time.Time `json:"created_at" db:"created_at"`
}

Contractor is an object representing an access code for a service member

func FetchGHCPrimeContractor

func FetchGHCPrimeContractor(db *pop.Connection) (*Contractor, error)

FetchGHCPrimeContractor returns the prime contractor

func (Contractor) TableName

func (c Contractor) TableName() string

TableName overrides the table name used by Pop.

func (*Contractor) Validate

func (c *Contractor) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type Contractors

type Contractors []Contractor

Contractors is a slice of Contractor objects

type CreatedOktaUser

type CreatedOktaUser struct {
	ID        string `json:"id"`
	Status    string `json:"status"`
	Created   string `json:"created"`
	Activated string `json:"activated"`
	Profile   struct {
		FirstName   string `json:"firstName"`
		LastName    string `json:"lastName"`
		MobilePhone string `json:"mobilePhone"`
		SecondEmail string `json:"secondEmail"`
		Login       string `json:"login"`
		Email       string `json:"email"`
	} `json:"profile"`
}

type CustomerContactType

type CustomerContactType string

CustomerContactType determines what type of customer contact for a service item. For domestic destination 1st day SIT.

const (
	// CustomerContactTypeFirst describes customer contacts for a FIRST type.
	CustomerContactTypeFirst CustomerContactType = "FIRST"
	// CustomerContactTypeSecond  describes customer contacts for a SECOND type.
	CustomerContactTypeSecond CustomerContactType = "SECOND"
)

type CustomerSupportRemark

type CustomerSupportRemark struct {
	ID           uuid.UUID  `db:"id"`
	Content      string     `db:"content"`
	OfficeUser   OfficeUser `belongs_to:"office_users" fk_id:"office_user_id"`
	OfficeUserID uuid.UUID  `db:"office_user_id"`
	Move         Move       `belongs_to:"moves" fk_id:"move_id"`
	MoveID       uuid.UUID  `db:"move_id"`
	CreatedAt    time.Time  `db:"created_at"`
	UpdatedAt    time.Time  `db:"updated_at"`
	DeletedAt    *time.Time `db:"deleted_at"`
}

CustomerSupportRemark struct represents the shape of an office move remark

func (CustomerSupportRemark) TableName

func (c CustomerSupportRemark) TableName() string

TableName overrides the table name used by Pop.

type CustomerSupportRemarks

type CustomerSupportRemarks []CustomerSupportRemark

type DateIsWorkday

type DateIsWorkday struct {
	Name     string
	Field    time.Time
	Calendar *cal.BusinessCalendar
}

DateIsWorkday validates that field is on a workday

func (*DateIsWorkday) IsValid

func (v *DateIsWorkday) IsValid(errors *validate.Errors)

IsValid adds error if field is not on valid workday

type DestinationType

type DestinationType string
const (
	DestinationTypeHomeOfRecord           DestinationType = "HOME_OF_RECORD"
	DestinationTypeHomeOfSelection        DestinationType = "HOME_OF_SELECTION"
	DestinationTypePlaceEnteredActiveDuty DestinationType = "PLACE_ENTERED_ACTIVE_DUTY"
	DestinationTypeOtherThanAuthorized    DestinationType = "OTHER_THAN_AUTHORIZED"
)

type DimensionType

type DimensionType string

DimensionType determines what type of dimension for a service item

const (
	// DimensionTypeItem describes dimensions for an ITEM type
	DimensionTypeItem DimensionType = "ITEM"
	// DimensionTypeCrate  describes dimensions for a CRATE type
	DimensionTypeCrate DimensionType = "CRATE"
)

type DiscountRateIsValid

type DiscountRateIsValid struct {
	Name  string
	Field unit.DiscountRate
}

DiscountRateIsValid validates that a DiscountRate contains a value between 0 and 1.

func (*DiscountRateIsValid) IsValid

func (v *DiscountRateIsValid) IsValid(errors *validate.Errors)

IsValid adds an error if the value is not between 0 and 1.

type DistanceCalculation

type DistanceCalculation struct {
	ID                   uuid.UUID `json:"id" db:"id"`
	OriginAddressID      uuid.UUID `json:"origin_address_id" db:"origin_address_id"`
	OriginAddress        Address   `belongs_to:"address" fk_id:"origin_address_id"`
	DestinationAddressID uuid.UUID `json:"destination_address_id" db:"destination_address_id"`
	DestinationAddress   Address   `belongs_to:"address" fk_id:"destination_address_id"`
	DistanceMiles        int       `json:"distance_miles" db:"distance_miles"`
	CreatedAt            time.Time `json:"created_at" db:"created_at"`
	UpdatedAt            time.Time `json:"updated_at" db:"updated_at"`
}

DistanceCalculation represents a distance calculation in miles between an origin and destination address

func NewDistanceCalculation

func NewDistanceCalculation(appCtx appcontext.AppContext, planner distanceCalculator, origin Address, destination Address, useZipOnly bool) (DistanceCalculation, error)

NewDistanceCalculation performs a distance calculation and returns the resulting DistanceCalculation model

func (DistanceCalculation) TableName

func (d DistanceCalculation) TableName() string

TableName overrides the table name used by Pop.

func (*DistanceCalculation) Validate

func (d *DistanceCalculation) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type Document

type Document struct {
	ID              uuid.UUID     `db:"id"`
	ServiceMemberID uuid.UUID     `db:"service_member_id"`
	ServiceMember   ServiceMember `belongs_to:"service_members" fk_id:"service_member_id"`
	CreatedAt       time.Time     `db:"created_at"`
	UpdatedAt       time.Time     `db:"updated_at"`
	DeletedAt       *time.Time    `db:"deleted_at"`
	UserUploads     UserUploads   `has_many:"user_uploads" fk_id:"document_id" order_by:"created_at asc"`
}

A Document represents a physical artifact such as a multipage form that was filled out by hand. A Document can have many associated Uploads, which allows for handling multiple files that belong to the same document.

func FetchDocument

func FetchDocument(db *pop.Connection, session *auth.Session, id uuid.UUID, includeDeletedDocs bool) (Document, error)

FetchDocument returns a document if the user has access to that document

func FetchDocumentWithNoRestrictions

func FetchDocumentWithNoRestrictions(db *pop.Connection, session *auth.Session, id uuid.UUID, includeDeletedDocs bool) (Document, error)

FetchDocument returns a document regardless if user has access to that document

func (Document) TableName

func (d Document) TableName() string

TableName overrides the table name used by Pop.

func (*Document) Validate

func (d *Document) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type Documents

type Documents []Document

type DutyLocation

type DutyLocation struct {
	ID                         uuid.UUID                     `json:"id" db:"id"`
	CreatedAt                  time.Time                     `json:"created_at" db:"created_at"`
	UpdatedAt                  time.Time                     `json:"updated_at" db:"updated_at"`
	Name                       string                        `json:"name" db:"name"`
	Affiliation                *internalmessages.Affiliation `json:"affiliation" db:"affiliation"`
	AddressID                  uuid.UUID                     `json:"address_id" db:"address_id"`
	Address                    Address                       `belongs_to:"address" fk_id:"address_id"`
	TransportationOfficeID     *uuid.UUID                    `json:"transportation_office_id" db:"transportation_office_id"`
	TransportationOffice       TransportationOffice          `belongs_to:"transportation_offices" fk_id:"transportation_office_id"`
	ProvidesServicesCounseling bool                          `json:"provides_services_counseling" db:"provides_services_counseling"`
}

DutyLocation represents a military duty location for a specific affiliation

func FetchDutyLocation

func FetchDutyLocation(tx *pop.Connection, id uuid.UUID) (DutyLocation, error)

FetchDutyLocation returns a DutyLocation for a given id

func FetchDutyLocationByName

func FetchDutyLocationByName(tx *pop.Connection, name string) (DutyLocation, error)

FetchDutyLocationByName returns a DutyLocation for a given unique name

func FetchDutyLocationWithTransportationOffice

func FetchDutyLocationWithTransportationOffice(tx *pop.Connection, id uuid.UUID) (DutyLocation, error)

FetchDutyLocationWithTransportationOffice returns a DutyLocation for a given id with the associated transportation office eagerly loaded

func (DutyLocation) TableName

func (d DutyLocation) TableName() string

TableName overrides the table name used by Pop.

func (*DutyLocation) Validate

func (d *DutyLocation) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type DutyLocationName

type DutyLocationName struct {
	ID             uuid.UUID    `json:"id" db:"id"`
	CreatedAt      time.Time    `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time    `json:"updated_at" db:"updated_at"`
	Name           string       `json:"name" db:"name"`
	DutyLocationID uuid.UUID    `json:"duty_location_id" db:"duty_location_id"`
	DutyLocation   DutyLocation `belongs_to:"duty_locations" fk_id:"duty_location_id"`
}

DutyLocationName represents an alternative name for a DutyLocation

func (DutyLocationName) TableName

func (d DutyLocationName) TableName() string

TableName overrides the table name used by Pop.

type DutyLocationNames

type DutyLocationNames []DutyLocationName

type DutyLocationTransportInfo

type DutyLocationTransportInfo struct {
	Name      string `db:"name"`
	PhoneLine string `db:"number"`
}

DutyLocationTransportInfo contains all info needed for notifications emails

func FetchDLContactInfo

func FetchDLContactInfo(db *pop.Connection, dutyLocationID *uuid.UUID) (*DutyLocationTransportInfo, error)

FetchDLContactInfo loads a duty location's associated transportation office and its first listed office phone number.

type DutyLocations

type DutyLocations []DutyLocation

func FetchDutyLocationsByPostalCode

func FetchDutyLocationsByPostalCode(tx *pop.Connection, postalCode string) (DutyLocations, error)

FetchDutyLocationsByPostalCode returns a duty location for a given postal code

func FindDutyLocations

func FindDutyLocations(tx *pop.Connection, search string) (DutyLocations, error)

FindDutyLocations returns all duty locations matching a search query

type EDIProcessing

type EDIProcessing struct {
	ID               uuid.UUID `db:"id"`
	EDIType          EDIType   `db:"edi_type"`
	NumEDIsProcessed int       `db:"num_edis_processed"`
	ProcessStartedAt time.Time `db:"process_started_at"`
	ProcessEndedAt   time.Time `db:"process_ended_at"`
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
}

EDIProcessing represents an email sent to a service member

func (*EDIProcessing) MarshalLogObject

func (e *EDIProcessing) MarshalLogObject(encoder zapcore.ObjectEncoder) error

MarshalLogObject is required to be able to zap.Object log this model.

func (EDIProcessing) TableName

func (e EDIProcessing) TableName() string

TableName overrides the table name used by Pop.

func (*EDIProcessing) Validate

func (e *EDIProcessing) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type EDIProcessings

type EDIProcessings []EDIProcessing

EDIProcessings is a slice of notification structs

type EDIType

type EDIType string

EDIType represents types of EDI Responses

const (
	// EDIType810 captures enum value "810"
	EDIType810 EDIType = "810"
	// EDIType824 captures enum value "824"
	EDIType824 EDIType = "824"
	// EDIType858 captures enum value "858"
	EDIType858 EDIType = "858"
	// EDIType997 captures enum value "997"
	EDIType997 EDIType = "997"
	// TPPSPaidInvoiceReport captures enum value "TPPSPaidInvoiceReport"
	TPPSPaidInvoiceReport EDIType = "TPPSPaidInvoiceReport"
)

func (EDIType) String

func (e EDIType) String() string

String returns a string representation of the admin role

type EagerAssociations

type EagerAssociations []string

EagerAssociations are a collection of named associations

type EdiError

type EdiError struct {
	ID                         uuid.UUID                                `json:"id" db:"id"`
	CreatedAt                  time.Time                                `json:"created_at" db:"created_at"`
	UpdatedAt                  time.Time                                `json:"updated_at" db:"updated_at"`
	PaymentRequestID           uuid.UUID                                `json:"payment_request_id" db:"payment_request_id"`
	PaymentRequest             PaymentRequest                           `belongs_to:"payment_requests" fk_id:"payment_request_id"`
	InterchangeControlNumberID *uuid.UUID                               `json:"interchange_control_number_id" db:"interchange_control_number_id"`
	InterchangeControlNumber   PaymentRequestToInterchangeControlNumber `belongs_to:"payment_request_to_interchange_control_numbers" fk_id:"interchange_control_number_id"`
	Code                       *string                                  `json:"code" db:"code"`
	Description                *string                                  `json:"description" db:"description"`
	EDIType                    EDIType                                  `json:"edi_type" db:"edi_type"`
}

EdiError stores errors found while sending an 858 and being reported from EDI response files (824, 997)

func (*EdiError) MarshalLogObject

func (e *EdiError) MarshalLogObject(encoder zapcore.ObjectEncoder) error

MarshalLogObject is required to be able to zap.Object log this model.

func (EdiError) TableName

func (e EdiError) TableName() string

TableName overrides the table name used by Pop.

func (*EdiError) Validate

func (e *EdiError) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type EdiErrors

type EdiErrors []EdiError

EdiErrors is a list of EDI Error

type ElectronicOrder

type ElectronicOrder struct {
	ID           uuid.UUID                 `json:"id" db:"id"`
	CreatedAt    time.Time                 `json:"created_at" db:"created_at"`
	UpdatedAt    time.Time                 `json:"updated_at" db:"updated_at"`
	OrdersNumber string                    `json:"orders_number" db:"orders_number"`
	Edipi        string                    `json:"edipi" db:"edipi"`
	Issuer       Issuer                    `json:"issuer" db:"issuer"`
	Revisions    ElectronicOrdersRevisions `has_many:"electronic_orders_revisions" fk_id:"electronic_order_id" order_by:"seq_num asc"`
}

ElectronicOrder contains the unchanging data of a set of orders across all amendments / revisions

func FetchElectronicOrderByID

func FetchElectronicOrderByID(db *pop.Connection, id uuid.UUID) (*ElectronicOrder, error)

FetchElectronicOrderByID gets all revisions of a set of Orders by their shared UUID, sorted in ascending order by their sequence number

func FetchElectronicOrderByIssuerAndOrdersNum

func FetchElectronicOrderByIssuerAndOrdersNum(db *pop.Connection, issuer string, ordersNum string) (*ElectronicOrder, error)

FetchElectronicOrderByIssuerAndOrdersNum gets all revisions of a set of Orders by the unique combination of the Orders number and the issuer.

func FetchElectronicOrdersByEdipiAndIssuers

func FetchElectronicOrdersByEdipiAndIssuers(db *pop.Connection, edipi string, issuers []string) ([]*ElectronicOrder, error)

FetchElectronicOrdersByEdipiAndIssuers gets all Orders issued to a member by EDIPI from the specified issuers

func (ElectronicOrder) String

func (e ElectronicOrder) String() string

func (ElectronicOrder) TableName

func (e ElectronicOrder) TableName() string

TableName overrides the table name used by Pop.

func (*ElectronicOrder) Validate

func (e *ElectronicOrder) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ElectronicOrders

type ElectronicOrders []ElectronicOrder

func (ElectronicOrders) String

func (e ElectronicOrders) String() string

type ElectronicOrdersAffiliation

type ElectronicOrdersAffiliation string

ElectronicOrdersAffiliation is a service member's military branch of service, or identifies a civilian

const (
	// ElectronicOrdersAffiliationAirForce captures enum value "air-force"
	ElectronicOrdersAffiliationAirForce ElectronicOrdersAffiliation = "air-force"
	// ElectronicOrdersAffiliationArmy captures enum value "army"
	ElectronicOrdersAffiliationArmy ElectronicOrdersAffiliation = "army"
	// ElectronicOrdersAffiliationCivilianAgency captures enum value "civilian-agency"
	ElectronicOrdersAffiliationCivilianAgency ElectronicOrdersAffiliation = "civilian-agency"
	// ElectronicOrdersAffiliationCoastGuard captures enum value "coast-guard"
	ElectronicOrdersAffiliationCoastGuard ElectronicOrdersAffiliation = "coast-guard"
	// ElectronicOrdersAffiliationMarineCorps captures enum value "marine-corps"
	ElectronicOrdersAffiliationMarineCorps ElectronicOrdersAffiliation = "marine-corps"
	// ElectronicOrdersAffiliationNavy captures enum value "navy"
	ElectronicOrdersAffiliationNavy ElectronicOrdersAffiliation = "navy"
)

type ElectronicOrdersRevision

type ElectronicOrdersRevision struct {
	ID                    uuid.UUID                   `json:"id" db:"id"`
	CreatedAt             time.Time                   `json:"created_at" db:"created_at"`
	UpdatedAt             time.Time                   `json:"updated_at" db:"updated_at"`
	ElectronicOrderID     uuid.UUID                   `json:"electronic_order_id" db:"electronic_order_id"`
	ElectronicOrder       ElectronicOrder             `belongs_to:"electronic_order" fk_id:"electronic_order_id"`
	SeqNum                int                         `json:"seq_num" db:"seq_num"`
	GivenName             string                      `json:"given_name" db:"given_name"`
	MiddleName            *string                     `json:"middle_name" db:"middle_name"`
	FamilyName            string                      `json:"family_name" db:"family_name"`
	NameSuffix            *string                     `json:"name_suffix" db:"name_suffix"`
	Affiliation           ElectronicOrdersAffiliation `json:"affiliation" db:"affiliation"`
	Paygrade              Paygrade                    `json:"paygrade" db:"paygrade"`
	Title                 *string                     `json:"title" db:"title"`
	Status                ElectronicOrdersStatus      `json:"status" db:"status"`
	DateIssued            time.Time                   `json:"date_issued" db:"date_issued"`
	NoCostMove            bool                        `json:"no_cost_move" db:"no_cost_move"`
	TdyEnRoute            bool                        `json:"tdy_en_route" db:"tdy_en_route"`
	TourType              TourType                    `json:"tour_type" db:"tour_type"`
	OrdersType            ElectronicOrdersType        `json:"orders_type" db:"orders_type"`
	HasDependents         bool                        `json:"has_dependents" db:"has_dependents"`
	LosingUIC             *string                     `json:"losing_uic" db:"losing_uic"`
	LosingUnitName        *string                     `json:"losing_unit_name" db:"losing_unit_name"`
	LosingUnitCity        *string                     `json:"losing_unit_city" db:"losing_unit_city"`
	LosingUnitLocality    *string                     `json:"losing_unit_locality" db:"losing_unit_locality"`
	LosingUnitCountry     *string                     `json:"losing_unit_country" db:"losing_unit_country"`
	LosingUnitPostalCode  *string                     `json:"losing_unit_postal_code" db:"losing_unit_postal_code"`
	GainingUIC            *string                     `json:"gaining_uic" db:"gaining_uic"`
	GainingUnitName       *string                     `json:"gaining_unit_name" db:"gaining_unit_name"`
	GainingUnitCity       *string                     `json:"gaining_unit_city" db:"gaining_unit_city"`
	GainingUnitLocality   *string                     `json:"gaining_unit_locality" db:"gaining_unit_locality"`
	GainingUnitCountry    *string                     `json:"gaining_unit_country" db:"gaining_unit_country"`
	GainingUnitPostalCode *string                     `json:"gaining_unit_postal_code" db:"gaining_unit_postal_code"`
	ReportNoEarlierThan   *time.Time                  `json:"report_no_earlier_than" db:"report_no_earlier_than"`
	ReportNoLaterThan     *time.Time                  `json:"report_no_later_than" db:"report_no_later_than"`
	HhgTAC                *string                     `json:"hhg_tac" db:"hhg_tac"`
	HhgSDN                *string                     `json:"hhg_sdn" db:"hhg_sdn"`
	HhgLOA                *string                     `json:"hhg_loa" db:"hhg_loa"`
	NtsTAC                *string                     `json:"nts_tac" db:"nts_tac"`
	NtsSDN                *string                     `json:"nts_sdn" db:"nts_sdn"`
	NtsLOA                *string                     `json:"nts_loa" db:"nts_loa"`
	PovShipmentTAC        *string                     `json:"pov_shipment_tac" db:"pov_shipment_tac"`
	PovShipmentSDN        *string                     `json:"pov_shipment_sdn" db:"pov_shipment_sdn"`
	PovShipmentLOA        *string                     `json:"pov_shipment_loa" db:"pov_shipment_loa"`
	PovStorageTAC         *string                     `json:"pov_storage_tac" db:"pov_storage_tac"`
	PovStorageSDN         *string                     `json:"pov_storage_sdn" db:"pov_storage_sdn"`
	PovStorageLOA         *string                     `json:"pov_storage_loa" db:"pov_storage_loa"`
	UbTAC                 *string                     `json:"ub_tac" db:"ub_tac"`
	UbSDN                 *string                     `json:"ub_sdn" db:"ub_sdn"`
	UbLOA                 *string                     `json:"ub_loa" db:"ub_loa"`
	Comments              *string                     `json:"comments" db:"comments"`
}

ElectronicOrdersRevision represents a complete amendment of one set of electronic orders

func (ElectronicOrdersRevision) String

func (e ElectronicOrdersRevision) String() string

func (ElectronicOrdersRevision) TableName

func (e ElectronicOrdersRevision) TableName() string

TableName overrides the table name used by Pop.

func (*ElectronicOrdersRevision) Validate

func (e *ElectronicOrdersRevision) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ElectronicOrdersRevisions

type ElectronicOrdersRevisions []ElectronicOrdersRevision

func (ElectronicOrdersRevisions) String

func (e ElectronicOrdersRevisions) String() string

type ElectronicOrdersStatus

type ElectronicOrdersStatus string

ElectronicOrdersStatus indicates whether these Orders are authorized, RFO (Request For Orders), or canceled. An RFO is not sufficient to authorize moving expenses; only authorized Orders can do that.

const (
	// ElectronicOrdersStatusAuthorized captures enum value "authorized"
	ElectronicOrdersStatusAuthorized ElectronicOrdersStatus = "authorized"
	// ElectronicOrdersStatusRfo captures enum value "rfo"
	ElectronicOrdersStatusRfo ElectronicOrdersStatus = "rfo"
	// ElectronicOrdersStatusCanceled captures enum value "canceled"
	ElectronicOrdersStatusCanceled ElectronicOrdersStatus = "canceled"
)

type ElectronicOrdersType

type ElectronicOrdersType string

ElectronicOrdersType is the type of travel or move for a set of Orders

const (
	// ElectronicOrdersTypeAccession captures enum value "accession"
	ElectronicOrdersTypeAccession ElectronicOrdersType = "accession"
	// ElectronicOrdersTypeBetweenDutyStations captures enum value "between-duty-stations"
	ElectronicOrdersTypeBetweenDutyStations ElectronicOrdersType = "between-duty-stations"
	// ElectronicOrdersTypeBrac captures enum value "brac"
	ElectronicOrdersTypeBrac ElectronicOrdersType = "brac"
	// ElectronicOrdersTypeCot captures enum value "cot"
	ElectronicOrdersTypeCot ElectronicOrdersType = "cot"
	// ElectronicOrdersTypeEmergencyEvac captures enum value "emergency-evac"
	ElectronicOrdersTypeEmergencyEvac ElectronicOrdersType = "emergency-evac"
	// ElectronicOrdersTypeIpcot captures enum value "ipcot"
	ElectronicOrdersTypeIpcot ElectronicOrdersType = "ipcot"
	// ElectronicOrdersTypeLowCostTravel captures enum value "low-cost-travel"
	ElectronicOrdersTypeLowCostTravel ElectronicOrdersType = "low-cost-travel"
	// ElectronicOrdersTypeOperational captures enum value "operational"
	ElectronicOrdersTypeOperational ElectronicOrdersType = "operational"
	// ElectronicOrdersTypeOteip captures enum value "oteip"
	ElectronicOrdersTypeOteip ElectronicOrdersType = "oteip"
	// ElectronicOrdersTypeRotational captures enum value "rotational"
	ElectronicOrdersTypeRotational ElectronicOrdersType = "rotational"
	// ElectronicOrdersTypeSeparation captures enum value "separation"
	ElectronicOrdersTypeSeparation ElectronicOrdersType = "separation"
	// ElectronicOrdersTypeSpecialPurpose captures enum value "special-purpose"
	ElectronicOrdersTypeSpecialPurpose ElectronicOrdersType = "special-purpose"
	// ElectronicOrdersTypeTraining captures enum value "training"
	ElectronicOrdersTypeTraining ElectronicOrdersType = "training"
	// ElectronicOrdersTypeUnitMove captures enum value "unit-move"
	ElectronicOrdersTypeUnitMove ElectronicOrdersType = "unit-move"
)

type Entitlement

type Entitlement struct {
	ID                    uuid.UUID `db:"id"`
	DependentsAuthorized  *bool     `db:"dependents_authorized"`
	TotalDependents       *int      `db:"total_dependents"`
	NonTemporaryStorage   *bool     `db:"non_temporary_storage"`
	PrivatelyOwnedVehicle *bool     `db:"privately_owned_vehicle"`
	//DBAuthorizedWeight is AuthorizedWeight when not null
	DBAuthorizedWeight                           *int             `db:"authorized_weight"`
	WeightAllotted                               *WeightAllotment `db:"-"`
	StorageInTransit                             *int             `db:"storage_in_transit"`
	GunSafe                                      bool             `db:"gun_safe"`
	RequiredMedicalEquipmentWeight               int              `db:"required_medical_equipment_weight"`
	OrganizationalClothingAndIndividualEquipment bool             `db:"organizational_clothing_and_individual_equipment"`
	ProGearWeight                                int              `db:"pro_gear_weight"`
	ProGearWeightSpouse                          int              `db:"pro_gear_weight_spouse"`
	CreatedAt                                    time.Time        `db:"created_at"`
	UpdatedAt                                    time.Time        `db:"updated_at"`
}

Entitlement is an object representing entitlements for orders

func (*Entitlement) AuthorizedWeight

func (e *Entitlement) AuthorizedWeight() *int

AuthorizedWeight returns authorized weight. If authorized weight has not been stored in DBAuthorizedWeight use either TotalWeightSelf with no dependents or TotalWeightSelfPlusDependents with dependents.

func (*Entitlement) SetWeightAllotment

func (e *Entitlement) SetWeightAllotment(grade string)

SetWeightAllotment sets the weight allotment TODO probably want to reconsider keeping grade a string rather than enum TODO and possibly consider creating ghc specific GetWeightAllotment should the two TODO diverge in the future

func (Entitlement) TableName

func (e Entitlement) TableName() string

TableName overrides the table name used by Pop.

func (*Entitlement) Validate

func (e *Entitlement) Validate(*pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

func (*Entitlement) WeightAllotment

func (e *Entitlement) WeightAllotment() *WeightAllotment

WeightAllotment returns the weight allotment

func (*Entitlement) WeightAllowance

func (e *Entitlement) WeightAllowance() *int

WeightAllowance will return the service member's weight allotment based on their grade and if dependents are authorized

type EvaluationReport

type EvaluationReport struct {
	ID                                 uuid.UUID                       `json:"id" db:"id"`
	OfficeUser                         OfficeUser                      `belongs_to:"office_users" fk_id:"office_user_id"`
	OfficeUserID                       uuid.UUID                       `db:"office_user_id"`
	Move                               Move                            `belongs_to:"moves" fk_id:"move_id"`
	MoveID                             uuid.UUID                       `db:"move_id"`
	Shipment                           *MTOShipment                    `belongs_to:"mto_shipments" fk_id:"shipment_id"`
	ShipmentID                         *uuid.UUID                      `json:"shipment_id" db:"shipment_id"`
	Type                               EvaluationReportType            `json:"type" db:"type"`
	InspectionDate                     *time.Time                      `json:"inspection_date" db:"inspection_date"`
	InspectionType                     *EvaluationReportInspectionType `json:"inspection_type" db:"inspection_type"`
	Location                           *EvaluationReportLocationType   `json:"location" db:"location"`
	LocationDescription                *string                         `json:"location_description" db:"location_description"`
	ObservedShipmentDeliveryDate       *time.Time                      `json:"observed_shipment_delivery_date" db:"observed_shipment_delivery_date"`
	ObservedShipmentPhysicalPickupDate *time.Time                      `json:"observed_shipment_physical_pickup_date" db:"observed_shipment_physical_pickup_date"`
	TimeDepart                         *time.Time                      `json:"time_depart" db:"time_depart"`
	EvalStart                          *time.Time                      `json:"eval_start" db:"eval_start"`
	EvalEnd                            *time.Time                      `json:"eval_end" db:"eval_end"`
	ViolationsObserved                 *bool                           `json:"violations_observed" db:"violations_observed"`
	Remarks                            *string                         `json:"remarks" db:"remarks"`
	SeriousIncident                    *bool                           `json:"serious_incident" db:"serious_incident"`
	SeriousIncidentDesc                *string                         `json:"serious_incident_desc" db:"serious_incident_desc"`
	ObservedClaimsResponseDate         *time.Time                      `json:"observed_claims_response_date" db:"observed_claims_response_date"`
	ObservedPickupDate                 *time.Time                      `json:"observed_pickup_date" db:"observed_pickup_date"`
	ObservedPickupSpreadStartDate      *time.Time                      `json:"observed_pickup_spread_start_date" db:"observed_pickup_spread_start_date"`
	ObservedPickupSpreadEndDate        *time.Time                      `json:"observed_pickup_spread_end_date" db:"observed_pickup_spread_end_date"`
	ObservedDeliveryDate               *time.Time                      `json:"observed_delivery_date" db:"observed_delivery_date"`
	SubmittedAt                        *time.Time                      `json:"submitted_at" db:"submitted_at"`
	CreatedAt                          time.Time                       `json:"created_at" db:"created_at"`
	UpdatedAt                          time.Time                       `json:"updated_at" db:"updated_at"`
	ReportViolations                   ReportViolations                `json:"report_violation,omitempty" fk_id:"report_id" has_many:"report_violation"`
}

func (EvaluationReport) TableName

func (r EvaluationReport) TableName() string

TableName overrides the table name used by Pop.

func (*EvaluationReport) Validate

func (r *EvaluationReport) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type EvaluationReportInspectionType

type EvaluationReportInspectionType string
const (
	EvaluationReportInspectionTypeDataReview EvaluationReportInspectionType = "DATA_REVIEW"
	EvaluationReportInspectionTypePhysical   EvaluationReportInspectionType = "PHYSICAL"
	EvaluationReportInspectionTypeVirtual    EvaluationReportInspectionType = "VIRTUAL"
)

type EvaluationReportLocationType

type EvaluationReportLocationType string
const (
	EvaluationReportLocationTypeOrigin      EvaluationReportLocationType = "ORIGIN"
	EvaluationReportLocationTypeDestination EvaluationReportLocationType = "DESTINATION"
	EvaluationReportLocationTypeOther       EvaluationReportLocationType = "OTHER"
)

type EvaluationReportType

type EvaluationReportType string
const (
	EvaluationReportTypeShipment   EvaluationReportType = "SHIPMENT"
	EvaluationReportTypeCounseling EvaluationReportType = "COUNSELING"
)

type EvaluationReports

type EvaluationReports []EvaluationReport

type Float64IsGreaterThan

type Float64IsGreaterThan struct {
	Name     string
	Field    float64
	Compared float64
	Message  string
}

Float64IsGreaterThan validates that a float64 is greater than a given value

func (*Float64IsGreaterThan) IsValid

func (v *Float64IsGreaterThan) IsValid(errors *validate.Errors)

IsValid adds an error if the field is not greater than the compared value.

type Float64IsPresent

type Float64IsPresent struct {
	Name    string
	Field   float64
	Message string
}

Float64IsPresent validates that a float64 is non-zero.

func (*Float64IsPresent) IsValid

func (v *Float64IsPresent) IsValid(errors *validate.Errors)

IsValid adds an error if the field equals 0.

type FuelEIADieselPrice

type FuelEIADieselPrice struct {
	ID                          uuid.UUID       `json:"id" db:"id"`
	CreatedAt                   time.Time       `json:"created_at" db:"created_at"`
	UpdatedAt                   time.Time       `json:"updated_at" db:"updated_at"`
	PubDate                     time.Time       `json:"pub_date" db:"pub_date"`
	RateStartDate               time.Time       `json:"rate_start_date" db:"rate_start_date"`
	RateEndDate                 time.Time       `json:"rate_end_date" db:"rate_end_date"`
	EIAPricePerGallonMillicents unit.Millicents `json:"eia_price_per_gallon_millicents" db:"eia_price_per_gallon_millicents"`
	BaselineRate                int64           `json:"baseline_rate" db:"baseline_rate"`
}

FuelEIADieselPrice used to hold data from the SDDC Fuel Surcharge information found at https://etops.sddc.army.mil/pls/ppcig_camp/fsc.output to calculate a shipment's fuel surcharge

func FetchMostRecentFuelPrices

func FetchMostRecentFuelPrices(dbConnection *pop.Connection, clock clock.Clock, numMonths int) ([]FuelEIADieselPrice, error)

FetchMostRecentFuelPrices queries and fetches all fuel_eia_diesel_prices for past specified number of months, including this month

func (FuelEIADieselPrice) String

func (f FuelEIADieselPrice) String() string

func (FuelEIADieselPrice) TableName

func (f FuelEIADieselPrice) TableName() string

TableName overrides the table name used by Pop.

func (*FuelEIADieselPrice) Validate

func (f *FuelEIADieselPrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type FuelEIADieselPrices

type FuelEIADieselPrices []FuelEIADieselPrice

func (FuelEIADieselPrices) String

func (f FuelEIADieselPrices) String() string

type GBLOCs

type GBLOCs []string

type GHCDieselFuelPrice

type GHCDieselFuelPrice struct {
	ID                    uuid.UUID       `json:"id" db:"id"`
	CreatedAt             time.Time       `json:"created_at" db:"created_at"`
	UpdatedAt             time.Time       `json:"updated_at" db:"updated_at"`
	FuelPriceInMillicents unit.Millicents `json:"fuel_price_in_millicents" db:"fuel_price_in_millicents"`
	PublicationDate       time.Time       `json:"publication_date" db:"publication_date"`
	EffectiveDate         time.Time       `json:"effective_date" db:"effective_date"`
	EndDate               time.Time       `json:"end_date" db:"end_date"`
}

GHCDieselFuelPrice represents the weekly national average diesel fuel price

func (GHCDieselFuelPrice) TableName

func (g GHCDieselFuelPrice) TableName() string

TableName overrides the table name used by Pop.

func (*GHCDieselFuelPrice) Validate

func (g *GHCDieselFuelPrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type GHCDomesticTransitTime

type GHCDomesticTransitTime struct {
	ID                 uuid.UUID `db:"id" csv:"id"`
	MaxDaysTransitTime int       `db:"max_days_transit_time" csv:"max_days_transit_time"`
	WeightLbsLower     int       `db:"weight_lbs_lower" csv:"weight_lbs_lower"`
	WeightLbsUpper     int       `db:"weight_lbs_upper" csv:"weight_lbs_upper"`
	DistanceMilesLower int       `db:"distance_miles_lower" csv:"distance_miles_lower"`
	DistanceMilesUpper int       `db:"distance_miles_upper" csv:"distance_miles_upper"`
}

GHCDomesticTransitTime Tab Domestic Transit Times

func (GHCDomesticTransitTime) TableName

func (g GHCDomesticTransitTime) TableName() string

TableName overrides the table name used by Pop.

type GsrAppeal

type GsrAppeal struct {
	ID                      uuid.UUID         `json:"id" db:"id"`
	EvaluationReportID      *uuid.UUID        `json:"evaluation_report_id" db:"evaluation_report_id"`
	EvaluationReport        *EvaluationReport `belongs_to:"evaluation_reports" fk_id:"evaluation_report_id"`
	ReportViolationID       *uuid.UUID        `json:"report_violation_id" db:"report_violation_id"`
	ReportViolation         *ReportViolation  `belongs_to:"report_violations" fk_id:"report_violations"`
	OfficeUserID            uuid.UUID         `json:"office_user_id" db:"office_user_id"`
	OfficeUser              OfficeUser        `belongs_to:"office_users" fk_id:"office_users"`
	IsSeriousIncidentAppeal *bool             `json:"is_serious_incident_appeal" db:"is_serious_incident_appeal"`
	AppealStatus            AppealStatus      `json:"appeal_status" db:"appeal_status"`
	Remarks                 string            `json:"remarks" db:"remarks"`
	CreatedAt               time.Time         `json:"created_at" db:"created_at"`
	UpdatedAt               time.Time         `json:"updated_at" db:"updated_at"`
	DeletedAt               *time.Time        `json:"deleted_at" db:"deleted_at"`
}

func (GsrAppeal) TableName

func (g GsrAppeal) TableName() string

TableName overrides the table name used by Pop.

func (*GsrAppeal) Validate

func (g *GsrAppeal) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type HaulType

type HaulType string
const (
	LINEHAUL  HaulType = "Linehaul"
	SHORTHAUL HaulType = "Shorthaul"
)

type Int64IsPresent

type Int64IsPresent struct {
	Name  string
	Field int64
}

Int64IsPresent validates that an int64 is greater than 0.

func (*Int64IsPresent) IsValid

func (v *Int64IsPresent) IsValid(errors *validate.Errors)

IsValid adds an error if the value is equal to 0.

type Invoice

type Invoice struct {
	ID            uuid.UUID     `json:"id" db:"id"`
	ApproverID    uuid.UUID     `json:"approver_id" db:"approver_id"`
	Approver      OfficeUser    `belongs_to:"office_user" fk_id:"approver_id"`
	Status        InvoiceStatus `json:"status" db:"status"`
	InvoiceNumber string        `json:"invoice_number" db:"invoice_number"`
	InvoicedDate  time.Time     `json:"invoiced_date" db:"invoiced_date"`
	CreatedAt     time.Time     `json:"created_at" db:"created_at"`
	UpdatedAt     time.Time     `json:"updated_at" db:"updated_at"`
	UserUploadID  *uuid.UUID    `json:"user_upload_id" db:"user_upload_id"`
	UserUpload    *UserUpload   `belongs_to:"user_uploads" fk_id:"user_upload_id"`
}

Invoice is a collection of line item charges to be sent for payment

func FetchInvoice

func FetchInvoice(db *pop.Connection, session *auth.Session, id uuid.UUID) (*Invoice, error)

FetchInvoice fetches and validates an invoice model

func (Invoice) TableName

func (i Invoice) TableName() string

TableName overrides the table name used by Pop.

func (*Invoice) Validate

func (i *Invoice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type InvoiceStatus

type InvoiceStatus string

InvoiceStatus represents the status of an invoice

const (
	// InvoiceStatusDRAFT captures enum value "DRAFT"
	InvoiceStatusDRAFT InvoiceStatus = "DRAFT"
	// InvoiceStatusINPROCESS captures enum value "IN_PROCESS"
	InvoiceStatusINPROCESS InvoiceStatus = "IN_PROCESS"
	// InvoiceStatusSUBMITTED captures enum value "SUBMITTED"
	InvoiceStatusSUBMITTED InvoiceStatus = "SUBMITTED"
	// InvoiceStatusSUBMISSIONFAILURE captures enum value "SUBMISSION_FAILURE"
	InvoiceStatusSUBMISSIONFAILURE InvoiceStatus = "SUBMISSION_FAILURE"
	// InvoiceStatusUPDATEFAILURE captures enum value "UPDATE_FAILURE"
	// This status indicates that the invoice was successfully submitted, but the updating of the invoice
	// and associated shipment line items failed.
	InvoiceStatusUPDATEFAILURE InvoiceStatus = "UPDATE_FAILURE"
)

type Invoices

type Invoices []Invoice

Invoices is an array of invoices

type Issuer

type Issuer string

Issuer is the organization that issues orders.

const (
	// IssuerArmy captures enum value "army"
	IssuerArmy Issuer = "army"
	// IssuerNavy captures enum value "navy"
	IssuerNavy Issuer = "navy"
	// IssuerAirForce captures enum value "air-force"
	IssuerAirForce Issuer = "air-force"
	// IssuerMarineCorps captures enum value "marine-corps"
	IssuerMarineCorps Issuer = "marine-corps"
	// IssuerCoastGuard captures enum value "coast-guard"
	IssuerCoastGuard Issuer = "coast-guard"
)

type ItemCanFitInsideCrate

type ItemCanFitInsideCrate struct {
	Name         string
	NameCompared string
	Item         *primemessages.MTOServiceItemDimension
	Crate        *primemessages.MTOServiceItemDimension
	Message      string
}

ItemCanFitInsideCrate is a structure for determining if an Item Dimension can fit inside a Crate Dimension

func (ItemCanFitInsideCrate) IsValid

func (v ItemCanFitInsideCrate) IsValid(errors *validate.Errors)

IsValid adds an error if the Item can not fit inside a Crate

type ItemCanFitInsideCrateV2

type ItemCanFitInsideCrateV2 struct {
	Name         string
	NameCompared string
	Item         *primev2messages.MTOServiceItemDimension
	Crate        *primev2messages.MTOServiceItemDimension
	Message      string
}

ItemCanFitInsideCrate is a structure for determining if an Item Dimension can fit inside a Crate Dimension

func (ItemCanFitInsideCrateV2) IsValid

func (v ItemCanFitInsideCrateV2) IsValid(errors *validate.Errors)

IsValid adds an error if the Item can not fit inside a Crate

type ItemCanFitInsideCrateV3

type ItemCanFitInsideCrateV3 struct {
	Name         string
	NameCompared string
	Item         *primev3messages.MTOServiceItemDimension
	Crate        *primev3messages.MTOServiceItemDimension
	Message      string
}

func (ItemCanFitInsideCrateV3) IsValid

func (v ItemCanFitInsideCrateV3) IsValid(errors *validate.Errors)

IsValid adds an error if the Item can not fit inside a Crate

type JSONMap

type JSONMap map[string]interface{}

AuditHistoryJSONData

func (*JSONMap) Scan

func (jm *JSONMap) Scan(value interface{}) error

Scan reads a data type and update the JSONMap to represent the value read from JSON

func (JSONMap) Value

func (jm JSONMap) Value() (driver.Value, error)

Value returns a JSON value (from JSONMap to JSON string)

type LOAType

type LOAType string

LOAType represents the possible TAC and SAC types for a mto shipment

const (
	// LOATypeHHG is the HHG TAC or SAC
	LOATypeHHG LOAType = "HHG"
	// LOATypeNTS is the NTS TAC or SAC
	LOATypeNTS LOAType = "NTS"
)

type LineOfAccounting

type LineOfAccounting struct {
	ID                        uuid.UUID  `json:"id" db:"id" pipe:"-"`
	LoaSysID                  *string    `json:"loa_sys_id" db:"loa_sys_id" pipe:"LOA_SYS_ID"`
	LoaDptID                  *string    `json:"loa_dpt_id" db:"loa_dpt_id" pipe:"LOA_DPT_ID"`
	LoaTnsfrDptNm             *string    `json:"loa_tnsfr_dpt_nm" db:"loa_tnsfr_dpt_nm" pipe:"LOA_TNSFR_DPT_NM"`
	LoaBafID                  *string    `json:"loa_baf_id" db:"loa_baf_id" pipe:"LOA_BAF_ID"`
	LoaTrsySfxTx              *string    `json:"loa_trsy_sfx_tx" db:"loa_trsy_sfx_tx" pipe:"LOA_TRSY_SFX_TX"`
	LoaMajClmNm               *string    `json:"loa_maj_clm_nm" db:"loa_maj_clm_nm" pipe:"LOA_MAJ_CLM_NM"`
	LoaOpAgncyID              *string    `json:"loa_op_agncy_id" db:"loa_op_agncy_id" pipe:"LOA_OP_AGNCY_ID"`
	LoaAlltSnID               *string    `json:"loa_allt_sn_id" db:"loa_allt_sn_id" pipe:"LOA_ALLT_SN_ID"`
	LoaPgmElmntID             *string    `json:"loa_pgm_elmnt_id" db:"loa_pgm_elmnt_id" pipe:"LOA_PGM_ELMNT_ID"`
	LoaTskBdgtSblnTx          *string    `json:"loa_tsk_bdgt_sbln_tx" db:"loa_tsk_bdgt_sbln_tx" pipe:"LOA_TSK_BDGT_SBLN_TX"`
	LoaDfAgncyAlctnRcpntID    *string    `json:"loa_df_agncy_alctn_rcpnt_id" db:"loa_df_agncy_alctn_rcpnt_id" pipe:"LOA_DF_AGNCY_ALCTN_RCPNT_ID"`
	LoaJbOrdNm                *string    `json:"loa_jb_ord_nm" db:"loa_jb_ord_nm" pipe:"LOA_JB_ORD_NM"`
	LoaSbaltmtRcpntID         *string    `json:"loa_sbaltmt_rcpnt_id" db:"loa_sbaltmt_rcpnt_id" pipe:"LOA_SBALTMT_RCPNT_ID"`
	LoaWkCntrRcpntNm          *string    `json:"loa_wk_cntr_rcpnt_nm" db:"loa_wk_cntr_rcpnt_nm" pipe:"LOA_WK_CNTR_RCPNT_NM"`
	LoaMajRmbsmtSrcID         *string    `json:"loa_maj_rmbsmt_src_id" db:"loa_maj_rmbsmt_src_id" pipe:"LOA_MAJ_RMBSMT_SRC_ID"`
	LoaDtlRmbsmtSrcID         *string    `json:"loa_dtl_rmbsmt_src_id" db:"loa_dtl_rmbsmt_src_id" pipe:"LOA_DTL_RMBSMT_SRC_ID"`
	LoaCustNm                 *string    `json:"loa_cust_nm" db:"loa_cust_nm" pipe:"LOA_CUST_NM"`
	LoaObjClsID               *string    `json:"loa_obj_cls_id" db:"loa_obj_cls_id" pipe:"LOA_OBJ_CLS_ID"`
	LoaSrvSrcID               *string    `json:"loa_srv_src_id" db:"loa_srv_src_id" pipe:"LOA_SRV_SRC_ID"`
	LoaSpclIntrID             *string    `json:"loa_spcl_intr_id" db:"loa_spcl_intr_id" pipe:"LOA_SPCL_INTR_ID"`
	LoaBdgtAcntClsNm          *string    `json:"loa_bdgt_acnt_cls_nm" db:"loa_bdgt_acnt_cls_nm" pipe:"LOA_BDGT_ACNT_CLS_NM"`
	LoaDocID                  *string    `json:"loa_doc_id" db:"loa_doc_id" pipe:"LOA_DOC_ID"`
	LoaClsRefID               *string    `json:"loa_cls_ref_id" db:"loa_cls_ref_id" pipe:"LOA_CLS_REF_ID"`
	LoaInstlAcntgActID        *string    `json:"loa_instl_acntg_act_id" db:"loa_instl_acntg_act_id" pipe:"LOA_INSTL_ACNTG_ACT_ID"`
	LoaLclInstlID             *string    `json:"loa_lcl_instl_id" db:"loa_lcl_instl_id" pipe:"LOA_LCL_INSTL_ID"`
	LoaFmsTrnsactnID          *string    `json:"loa_fms_trnsactn_id" db:"loa_fms_trnsactn_id" pipe:"LOA_FMS_TRNSACTN_ID"`
	LoaDscTx                  *string    `json:"loa_dsc_tx" db:"loa_dsc_tx" pipe:"LOA_DSC_TX"`
	LoaBgnDt                  *time.Time `json:"loa_bgn_dt" db:"loa_bgn_dt" pipe:"LOA_BGN_DT"`
	LoaEndDt                  *time.Time `json:"loa_end_dt" db:"loa_end_dt" pipe:"LOA_END_DT"`
	LoaFnctPrsNm              *string    `json:"loa_fnct_prs_nm" db:"loa_fnct_prs_nm" pipe:"LOA_FNCT_PRS_NM"`
	LoaStatCd                 *string    `json:"loa_stat_cd" db:"loa_stat_cd" pipe:"LOA_STAT_CD"`
	LoaHistStatCd             *string    `json:"loa_hist_stat_cd" db:"loa_hist_stat_cd" pipe:"LOA_HIST_STAT_CD"`
	LoaHsGdsCd                *string    `json:"loa_hs_gds_cd" db:"loa_hs_gds_cd" pipe:"LOA_HS_GDS_CD"`
	OrgGrpDfasCd              *string    `json:"org_grp_dfas_cd" db:"org_grp_dfas_cd" pipe:"ORG_GRP_DFAS_CD"`
	LoaUic                    *string    `json:"loa_uic" db:"loa_uic" pipe:"LOA_UIC"`
	LoaTrnsnID                *string    `json:"loa_trnsn_id" db:"loa_trnsn_id" pipe:"LOA_TRNSN_ID"`
	LoaSubAcntID              *string    `json:"loa_sub_acnt_id" db:"loa_sub_acnt_id" pipe:"LOA_SUB_ACNT_ID"`
	LoaBetCd                  *string    `json:"loa_bet_cd" db:"loa_bet_cd" pipe:"LOA_BET_CD"`
	LoaFndTyFgCd              *string    `json:"loa_fnd_ty_fg_cd" db:"loa_fnd_ty_fg_cd" pipe:"LOA_FND_TY_FG_CD"`
	LoaBgtLnItmID             *string    `json:"loa_bgt_ln_itm_id" db:"loa_bgt_ln_itm_id" pipe:"LOA_BGT_LN_ITM_ID"`
	LoaScrtyCoopImplAgncCd    *string    `json:"loa_scrty_coop_impl_agnc_cd" db:"loa_scrty_coop_impl_agnc_cd" pipe:"LOA_SCRTY_COOP_IMPL_AGNC_CD"`
	LoaScrtyCoopDsgntrCd      *string    `json:"loa_scrty_coop_dsgntr_cd" db:"loa_scrty_coop_dsgntr_cd" pipe:"LOA_SCRTY_COOP_DSGNTR_CD"`
	LoaScrtyCoopLnItmID       *string    `json:"loa_scrty_coop_ln_itm_id" db:"loa_scrty_coop_ln_itm_id" pipe:"LOA_SCRTY_COOP_LN_ITM_ID"`
	LoaAgncDsbrCd             *string    `json:"loa_agnc_dsbr_cd" db:"loa_agnc_dsbr_cd" pipe:"LOA_AGNC_DSBR_CD"`
	LoaAgncAcntngCd           *string    `json:"loa_agnc_acntng_cd" db:"loa_agnc_acntng_cd" pipe:"LOA_AGNC_ACNTNG_CD"`
	LoaFndCntrID              *string    `json:"loa_fnd_cntr_id" db:"loa_fnd_cntr_id" pipe:"LOA_FND_CNTR_ID"`
	LoaCstCntrID              *string    `json:"loa_cst_cntr_id" db:"loa_cst_cntr_id" pipe:"LOA_CST_CNTR_ID"`
	LoaPrjID                  *string    `json:"loa_prj_id" db:"loa_prj_id" pipe:"LOA_PRJ_ID"`
	LoaActvtyID               *string    `json:"loa_actvty_id" db:"loa_actvty_id" pipe:"LOA_ACTVTY_ID"`
	LoaCstCd                  *string    `json:"loa_cst_cd" db:"loa_cst_cd" pipe:"LOA_CST_CD"`
	LoaWrkOrdID               *string    `json:"loa_wrk_ord_id" db:"loa_wrk_ord_id" pipe:"LOA_WRK_ORD_ID"`
	LoaFnclArID               *string    `json:"loa_fncl_ar_id" db:"loa_fncl_ar_id" pipe:"LOA_FNCL_AR_ID"`
	LoaScrtyCoopCustCd        *string    `json:"loa_scrty_coop_cust_cd" db:"loa_scrty_coop_cust_cd" pipe:"LOA_SCRTY_COOP_CUST_CD"`
	LoaEndFyTx                *int       `json:"loa_end_fy_tx" db:"loa_end_fy_tx" pipe:"LOA_END_FY_TX"`
	LoaBgFyTx                 *int       `json:"loa_bg_fy_tx" db:"loa_bg_fy_tx" pipe:"LOA_BG_FY_TX"`
	LoaBgtRstrCd              *string    `json:"loa_bgt_rstr_cd" db:"loa_bgt_rstr_cd" pipe:"LOA_BGT_RSTR_CD"`
	LoaBgtSubActCd            *string    `json:"loa_bgt_sub_act_cd" db:"loa_bgt_sub_act_cd" pipe:"LOA_BGT_SUB_ACT_CD"`
	CreatedAt                 time.Time  `json:"created_at" db:"created_at" pipe:"-"`
	UpdatedAt                 time.Time  `json:"updated_at" db:"updated_at" pipe:"-"`
	ValidLoaForTac            *bool      `json:"valid_loa_for_tac" db:"valid_loa_for_tac"`
	ValidHhgProgramCodeForLoa *bool      `json:"valid_hhg_code_for_loa" db:"valid_hhg_code_for_loa"`
}

func (LineOfAccounting) TableName

func (l LineOfAccounting) TableName() string

TableName overrides the table name used by Pop.

type MTOAgent

type MTOAgent struct {
	ID            uuid.UUID    `db:"id"`
	MTOShipment   MTOShipment  `belongs_to:"mto_shipments" fk_id:"mto_shipment_id"`
	MTOShipmentID uuid.UUID    `db:"mto_shipment_id"`
	FirstName     *string      `db:"first_name"`
	LastName      *string      `db:"last_name"`
	Email         *string      `db:"email"`
	Phone         *string      `db:"phone"`
	MTOAgentType  MTOAgentType `db:"agent_type"`
	CreatedAt     time.Time    `db:"created_at"`
	UpdatedAt     time.Time    `db:"updated_at"`
	DeletedAt     *time.Time   `db:"deleted_at"`
}

MTOAgent is a struct that represents the mto_agents table.

func (MTOAgent) TableName

func (m MTOAgent) TableName() string

TableName overrides the table name used by Pop.

func (*MTOAgent) Validate

func (m *MTOAgent) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type MTOAgentType

type MTOAgentType string

MTOAgentType represents the type label for move task order agent

const (
	MTOAgentReleasing MTOAgentType = "RELEASING_AGENT"
	MTOAgentReceiving MTOAgentType = "RECEIVING_AGENT"
)

Constants for the MTOAgentType

type MTOAgents

type MTOAgents []MTOAgent

MTOAgents is a collection of MTOAgent

type MTOServiceItem

type MTOServiceItem struct {
	ID                                uuid.UUID                      `db:"id"`
	MoveTaskOrder                     Move                           `belongs_to:"moves" fk_id:"move_id"`
	MoveTaskOrderID                   uuid.UUID                      `db:"move_id"`
	MTOShipment                       MTOShipment                    `belongs_to:"mto_shipments" fk_id:"mto_shipment_id"`
	MTOShipmentID                     *uuid.UUID                     `db:"mto_shipment_id"`
	ReService                         ReService                      `belongs_to:"re_services" fk_id:"re_service_id"`
	ReServiceID                       uuid.UUID                      `db:"re_service_id"`
	Reason                            *string                        `db:"reason"`
	RejectionReason                   *string                        `db:"rejection_reason"`
	Status                            MTOServiceItemStatus           `db:"status"`
	PickupPostalCode                  *string                        `db:"pickup_postal_code"`
	SITPostalCode                     *string                        `db:"sit_postal_code"`
	SITEntryDate                      *time.Time                     `db:"sit_entry_date"`
	SITDepartureDate                  *time.Time                     `db:"sit_departure_date"`
	SITCustomerContacted              *time.Time                     `db:"sit_customer_contacted"`
	SITRequestedDelivery              *time.Time                     `db:"sit_requested_delivery"`
	SITOriginHHGOriginalAddress       *Address                       `belongs_to:"addresses" fk_id:"sit_origin_hhg_original_address_id"`
	SITOriginHHGOriginalAddressID     *uuid.UUID                     `db:"sit_origin_hhg_original_address_id"`
	SITOriginHHGActualAddress         *Address                       `belongs_to:"addresses" fk_id:"sit_origin_hhg_actual_address_id"`
	SITOriginHHGActualAddressID       *uuid.UUID                     `db:"sit_origin_hhg_actual_address_id"`
	SITDestinationOriginalAddress     *Address                       `belongs_to:"addresses" fk_id:"sit_destination_original_address_id"`
	SITDestinationOriginalAddressID   *uuid.UUID                     `db:"sit_destination_original_address_id"`
	SITDestinationFinalAddress        *Address                       `belongs_to:"addresses" fk_id:"sit_destination_final_address_id"`
	SITDestinationFinalAddressID      *uuid.UUID                     `db:"sit_destination_final_address_id"`
	Description                       *string                        `db:"description"`
	EstimatedWeight                   *unit.Pound                    `db:"estimated_weight"`
	ActualWeight                      *unit.Pound                    `db:"actual_weight"`
	Dimensions                        MTOServiceItemDimensions       `has_many:"mto_service_item_dimensions" fk_id:"mto_service_item_id"`
	CustomerContacts                  MTOServiceItemCustomerContacts `many_to_many:"service_items_customer_contacts"`
	ServiceRequestDocuments           ServiceRequestDocuments        `has_many:"service_request_document" fk_id:"mto_service_item_id"`
	CreatedAt                         time.Time                      `db:"created_at"`
	UpdatedAt                         time.Time                      `db:"updated_at"`
	ApprovedAt                        *time.Time                     `db:"approved_at"`
	RejectedAt                        *time.Time                     `db:"rejected_at"`
	RequestedApprovalsRequestedStatus *bool                          `db:"requested_approvals_requested_status"`
	CustomerExpense                   bool                           `db:"customer_expense"`
	CustomerExpenseReason             *string                        `db:"customer_expense_reason"`
	SITDeliveryMiles                  *int                           `db:"sit_delivery_miles"`
	PricingEstimate                   *unit.Cents                    `db:"pricing_estimate"`
	StandaloneCrate                   *bool                          `db:"standalone_crate"`
	LockedPriceCents                  *unit.Cents                    `db:"locked_price_cents"`
}

MTOServiceItem is an object representing service items for a move task order.

func FetchRelatedDestinationSITFuelCharge

func FetchRelatedDestinationSITFuelCharge(tx *pop.Connection, mtoServiceItemID uuid.UUID) (MTOServiceItem, error)

func FetchServiceItem

func FetchServiceItem(db *pop.Connection, serviceItemID uuid.UUID) (MTOServiceItem, error)

func (MTOServiceItem) TableName

func (m MTOServiceItem) TableName() string

TableName overrides the table name used by Pop.

func (*MTOServiceItem) Validate

func (m *MTOServiceItem) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type MTOServiceItemCustomerContact

type MTOServiceItemCustomerContact struct {
	ID                         uuid.UUID           `db:"id"`
	MTOServiceItems            MTOServiceItems     `many_to_many:"service_items_customer_contacts" db:"-"`
	Type                       CustomerContactType `db:"type"`
	DateOfContact              time.Time           `db:"date_of_contact"`
	TimeMilitary               string              `db:"time_military"`
	FirstAvailableDeliveryDate time.Time           `db:"first_available_delivery_date"`
	CreatedAt                  time.Time           `db:"created_at"`
	UpdatedAt                  time.Time           `db:"updated_at"`
}

MTOServiceItemCustomerContact is an object representing customer contact for a service item.

func (MTOServiceItemCustomerContact) TableName

func (m MTOServiceItemCustomerContact) TableName() string

TableName overrides the table name used by Pop.

func (*MTOServiceItemCustomerContact) Validate

func (m *MTOServiceItemCustomerContact) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type MTOServiceItemCustomerContacts

type MTOServiceItemCustomerContacts []MTOServiceItemCustomerContact

MTOServiceItemCustomerContacts is a slice containing MTOServiceItemCustomerContact.

type MTOServiceItemDimension

type MTOServiceItemDimension struct {
	ID               uuid.UUID             `db:"id"`
	MTOServiceItem   MTOServiceItem        `belongs_to:"mto_service_items" fk_id:"mto_service_item_id"`
	MTOServiceItemID uuid.UUID             `db:"mto_service_item_id"`
	Type             DimensionType         `db:"type"`
	Length           unit.ThousandthInches `db:"length_thousandth_inches"`
	Height           unit.ThousandthInches `db:"height_thousandth_inches"`
	Width            unit.ThousandthInches `db:"width_thousandth_inches"`
	CreatedAt        time.Time             `db:"created_at"`
	UpdatedAt        time.Time             `db:"updated_at"`
}

MTOServiceItemDimension is an object representing dimensions for a service item.

func (MTOServiceItemDimension) TableName

func (m MTOServiceItemDimension) TableName() string

TableName overrides the table name used by Pop.

func (*MTOServiceItemDimension) Validate

func (m *MTOServiceItemDimension) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

func (*MTOServiceItemDimension) Volume

Volume calculates Length x Height x Width

type MTOServiceItemDimensions

type MTOServiceItemDimensions []MTOServiceItemDimension

MTOServiceItemDimensions is a slice containing MTOServiceItemDimension.

type MTOServiceItemSingle

type MTOServiceItemSingle struct {
	ID                              uuid.UUID            `db:"id"`
	MoveTaskOrderID                 uuid.UUID            `db:"move_id"`
	MTOShipmentID                   *uuid.UUID           `db:"mto_shipment_id"`
	ReServiceID                     uuid.UUID            `db:"re_service_id"`
	CreatedAt                       time.Time            `db:"created_at"`
	UpdatedAt                       time.Time            `db:"updated_at"`
	Reason                          *string              `db:"reason"`
	PickupPostalCode                *string              `db:"pickup_postal_code"`
	Description                     *string              `db:"description"`
	Status                          MTOServiceItemStatus `db:"status"`
	RejectionReason                 *string              `db:"rejection_reason"`
	ApprovedAt                      *time.Time           `db:"approved_at"`
	RejectedAt                      *time.Time           `db:"rejected_at"`
	SITPostalCode                   *string              `db:"sit_postal_code"`
	SITEntryDate                    *time.Time           `db:"sit_entry_date"`
	SITDepartureDate                *time.Time           `db:"sit_departure_date"`
	SITDestinationFinalAddressID    *uuid.UUID           `db:"sit_destination_final_address_id"`
	SITOriginHHGOriginalAddressID   *uuid.UUID           `db:"sit_origin_hhg_original_address_id"`
	SITOriginHHGActualAddressID     *uuid.UUID           `db:"sit_origin_hhg_actual_address_id"`
	EstimatedWeight                 *unit.Pound          `db:"estimated_weight"`
	ActualWeight                    *unit.Pound          `db:"actual_weight"`
	SITDestinationOriginalAddressID *uuid.UUID           `db:"sit_destination_original_address_id"`
	SITCustomerContacted            *time.Time           `db:"sit_customer_contacted"`
	SITRequestedDelivery            *time.Time           `db:"sit_requested_delivery"`
	CustomerExpense                 bool                 `db:"customer_expense"`
	CustomerExpenseReason           *string              `db:"customer_expense_reason"`
	SITDeliveryMiles                *unit.Miles          `db:"sit_delivery_miles"`
	PricingEstimate                 *unit.Cents          `db:"pricing_estimate"`
}

MTOServiceItemSingle is an object representing a single column in the service items table

type MTOServiceItemStatus

type MTOServiceItemStatus string

MTOServiceItemStatus represents the possible statuses for a mto shipment

const (
	// MTOServiceItemStatusSubmitted is the submitted status type for MTO Service Items
	MTOServiceItemStatusSubmitted MTOServiceItemStatus = "SUBMITTED"
	// MTOServiceItemStatusApproved is the approved status type for MTO Service Items
	MTOServiceItemStatusApproved MTOServiceItemStatus = "APPROVED"
	// MTOServiceItemStatusRejected is the rejected status type for MTO Service Items
	MTOServiceItemStatusRejected MTOServiceItemStatus = "REJECTED"
)

type MTOServiceItems

type MTOServiceItems []MTOServiceItem

MTOServiceItems is a slice containing MTOServiceItems

func FetchRelatedDestinationSITServiceItems

func FetchRelatedDestinationSITServiceItems(tx *pop.Connection, mtoServiceItemID uuid.UUID) (MTOServiceItems, error)

FetchRelatedDestinationSITServiceItems returns all service items with destination SIT ReService codes that are associated with the same shipment as the provided service item.

type MTOShipment

type MTOShipment struct {
	ID                               uuid.UUID              `db:"id"`
	MoveTaskOrder                    Move                   `belongs_to:"moves" fk_id:"move_id"`
	MoveTaskOrderID                  uuid.UUID              `db:"move_id"`
	ScheduledPickupDate              *time.Time             `db:"scheduled_pickup_date"`
	RequestedPickupDate              *time.Time             `db:"requested_pickup_date"`
	RequestedDeliveryDate            *time.Time             `db:"requested_delivery_date"`
	ApprovedDate                     *time.Time             `db:"approved_date"`
	FirstAvailableDeliveryDate       *time.Time             `db:"first_available_delivery_date"`
	ActualPickupDate                 *time.Time             `db:"actual_pickup_date"`
	RequiredDeliveryDate             *time.Time             `db:"required_delivery_date"`
	ScheduledDeliveryDate            *time.Time             `db:"scheduled_delivery_date"`
	ActualDeliveryDate               *time.Time             `db:"actual_delivery_date"`
	CustomerRemarks                  *string                `db:"customer_remarks"`
	CounselorRemarks                 *string                `db:"counselor_remarks"`
	PickupAddress                    *Address               `belongs_to:"addresses" fk_id:"pickup_address_id"`
	PickupAddressID                  *uuid.UUID             `db:"pickup_address_id"`
	DestinationAddress               *Address               `belongs_to:"addresses" fk_id:"destination_address_id"`
	DestinationAddressID             *uuid.UUID             `db:"destination_address_id"`
	DestinationType                  *DestinationType       `db:"destination_address_type"`
	MTOAgents                        MTOAgents              `has_many:"mto_agents" fk_id:"mto_shipment_id"`
	MTOServiceItems                  MTOServiceItems        `has_many:"mto_service_items" fk_id:"mto_shipment_id"`
	SecondaryPickupAddress           *Address               `belongs_to:"addresses" fk_id:"secondary_pickup_address_id"`
	SecondaryPickupAddressID         *uuid.UUID             `db:"secondary_pickup_address_id"`
	HasSecondaryPickupAddress        *bool                  `db:"has_secondary_pickup_address"`
	SecondaryDeliveryAddress         *Address               `belongs_to:"addresses" fk_id:"secondary_delivery_address_id"`
	SecondaryDeliveryAddressID       *uuid.UUID             `db:"secondary_delivery_address_id"`
	HasSecondaryDeliveryAddress      *bool                  `db:"has_secondary_delivery_address"`
	TertiaryPickupAddress            *Address               `belongs_to:"addresses" fk_id:"tertiary_pickup_address_id"`
	TertiaryPickupAddressID          *uuid.UUID             `db:"tertiary_pickup_address_id"`
	HasTertiaryPickupAddress         *bool                  `db:"has_tertiary_pickup_address"`
	TertiaryDeliveryAddress          *Address               `belongs_to:"addresses" fk_id:"tertiary_delivery_address_id"`
	TertiaryDeliveryAddressID        *uuid.UUID             `db:"tertiary_delivery_address_id"`
	HasTertiaryDeliveryAddress       *bool                  `db:"has_tertiary_delivery_address"`
	SITDaysAllowance                 *int                   `db:"sit_days_allowance"`
	SITDurationUpdates               SITDurationUpdates     `has_many:"sit_extensions" fk_id:"mto_shipment_id"`
	PrimeEstimatedWeight             *unit.Pound            `db:"prime_estimated_weight"`
	PrimeEstimatedWeightRecordedDate *time.Time             `db:"prime_estimated_weight_recorded_date"`
	PrimeActualWeight                *unit.Pound            `db:"prime_actual_weight"`
	BillableWeightCap                *unit.Pound            `db:"billable_weight_cap"`
	BillableWeightJustification      *string                `db:"billable_weight_justification"`
	NTSRecordedWeight                *unit.Pound            `db:"nts_recorded_weight"`
	ShipmentType                     MTOShipmentType        `db:"shipment_type"`
	Status                           MTOShipmentStatus      `db:"status"`
	Diversion                        bool                   `db:"diversion"`
	DiversionReason                  *string                `db:"diversion_reason"`
	DivertedFromShipmentID           *uuid.UUID             `db:"diverted_from_shipment_id"`
	ActualProGearWeight              *unit.Pound            `db:"actual_pro_gear_weight"`
	ActualSpouseProGearWeight        *unit.Pound            `db:"actual_spouse_pro_gear_weight"`
	RejectionReason                  *string                `db:"rejection_reason"`
	Distance                         *unit.Miles            `db:"distance"`
	Reweigh                          *Reweigh               `has_one:"reweighs" fk_id:"shipment_id"`
	UsesExternalVendor               bool                   `db:"uses_external_vendor"`
	StorageFacility                  *StorageFacility       `belongs_to:"storage_facilities" fk:"storage_facility_id"`
	StorageFacilityID                *uuid.UUID             `db:"storage_facility_id"`
	ServiceOrderNumber               *string                `db:"service_order_number"`
	TACType                          *LOAType               `db:"tac_type"`
	SACType                          *LOAType               `db:"sac_type"`
	PPMShipment                      *PPMShipment           `has_one:"ppm_shipment" fk_id:"shipment_id"`
	BoatShipment                     *BoatShipment          `has_one:"boat_shipment" fk_id:"shipment_id"`
	DeliveryAddressUpdate            *ShipmentAddressUpdate `has_one:"shipment_address_update" fk_id:"shipment_id"`
	CreatedAt                        time.Time              `db:"created_at"`
	UpdatedAt                        time.Time              `db:"updated_at"`
	DeletedAt                        *time.Time             `db:"deleted_at"`
	ShipmentLocator                  *string                `db:"shipment_locator"`
	OriginSITAuthEndDate             *time.Time             `db:"origin_sit_auth_end_date"`
	DestinationSITAuthEndDate        *time.Time             `db:"dest_sit_auth_end_date"`
	MobileHome                       *MobileHome            `has_one:"mobile_home" fk_id:"shipment_id"`
}

MTOShipment is an object representing data for a move task order shipment

func (MTOShipment) TableName

func (m MTOShipment) TableName() string

TableName overrides the table name used by Pop.

func (*MTOShipment) Validate

func (m *MTOShipment) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type MTOShipmentStatus

type MTOShipmentStatus string

MTOShipmentStatus represents the possible statuses for a mto shipment

const (
	// MTOShipmentStatusDraft is the draft status type for MTO Shipments
	MTOShipmentStatusDraft MTOShipmentStatus = "DRAFT"
	// MTOShipmentStatusSubmitted is the submitted status type for MTO Shipments
	MTOShipmentStatusSubmitted MTOShipmentStatus = "SUBMITTED"
	// MTOShipmentStatusApproved is the approved status type for MTO Shipments
	MTOShipmentStatusApproved MTOShipmentStatus = "APPROVED"
	// MTOShipmentStatusRejected is the rejected status type for MTO Shipments
	MTOShipmentStatusRejected MTOShipmentStatus = "REJECTED"
	// MTOShipmentStatusCancellationRequested indicates the TOO has requested that the Prime cancel the shipment
	MTOShipmentStatusCancellationRequested MTOShipmentStatus = "CANCELLATION_REQUESTED"
	// MTOShipmentStatusCanceled indicates that a shipment has been canceled by the Prime
	MTOShipmentStatusCanceled MTOShipmentStatus = "CANCELED"
	// MTOShipmentStatusDiversionRequested indicates that the TOO has requested that the Prime divert a shipment
	MTOShipmentStatusDiversionRequested MTOShipmentStatus = "DIVERSION_REQUESTED"
)

type MTOShipmentType

type MTOShipmentType string

MTOShipmentType represents the type of shipments the mto shipment is

const (
	// MTOShipmentTypeHHG is an HHG Shipment Type default
	MTOShipmentTypeHHG MTOShipmentType = "HHG"
	// MTOShipmentTypeInternationalHHG is a Shipment Type for International HHG
	MTOShipmentTypeInternationalHHG MTOShipmentType = "INTERNATIONAL_HHG"
	// MTOShipmentTypeInternationalUB is a Shipment Type for International UB
	MTOShipmentTypeInternationalUB MTOShipmentType = "INTERNATIONAL_UB"
	// MTOShipmentTypeHHGIntoNTSDom is an HHG Shipment Type for going into NTS Domestic
	MTOShipmentTypeHHGIntoNTSDom MTOShipmentType = NTSRaw
	// MTOShipmentTypeHHGOutOfNTSDom is an HHG Shipment Type for going out of NTS Domestic
	MTOShipmentTypeHHGOutOfNTSDom MTOShipmentType = NTSrRaw
	// MTOShipmentTypeMobileHome is a Shipment Type for MobileHome
	MTOShipmentTypeMobileHome MTOShipmentType = "MOBILE_HOME"
	// MTOShipmentTypeBoatHaulAway is a Shipment Type for Boat Haul Away
	MTOShipmentTypeBoatHaulAway MTOShipmentType = "BOAT_HAUL_AWAY"
	// MTOShipmentTypeBoatTowAway is a Shipment Type for Boat Tow Away
	MTOShipmentTypeBoatTowAway MTOShipmentType = "BOAT_TOW_AWAY"
	// MTOShipmentTypePPM is a Shipment Type for Personally Procured Move shipments
	MTOShipmentTypePPM MTOShipmentType = "PPM"
)

type MTOShipments

type MTOShipments []MTOShipment

MTOShipments is a list of mto shipments

type Market

type Market string

Market represents the market for an international move

const (
	MarketConus  Market = "C"
	MarketOconus Market = "O"
)

This lists available markets for international accessorial pricing

func (Market) String

func (m Market) String() string

type MethodOfReceipt

type MethodOfReceipt string

MethodOfReceipt is how the SM will be paid

const (
	// MethodOfReceiptMILPAY captures enum value MIL_PAY
	MethodOfReceiptMILPAY MethodOfReceipt = "MIL_PAY"
	// MethodOfReceiptOTHERDD captures enum value OTHER_DD
	MethodOfReceiptOTHERDD MethodOfReceipt = "OTHER_DD"
	// MethodOfReceiptGTCC captures enum value GTCC
	MethodOfReceiptGTCC MethodOfReceipt = "GTCC"
)

type MobileHome

type MobileHome struct {
	ID             uuid.UUID   `json:"id" db:"id"`
	ShipmentID     uuid.UUID   `json:"shipment_id" db:"shipment_id"`
	Shipment       MTOShipment `belongs_to:"mto_shipments" fk_id:"shipment_id"`
	Make           *string     `json:"make" db:"make"`
	Model          *string     `json:"model" db:"model"`
	Year           *int        `json:"year" db:"year"`
	LengthInInches *int        `json:"length_in_inches" db:"length_in_inches"`
	HeightInInches *int        `json:"height_in_inches" db:"height_in_inches"`
	WidthInInches  *int        `json:"width_in_inches" db:"width_in_inches"`
	CreatedAt      time.Time   `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time   `json:"updated_at" db:"updated_at"`
	DeletedAt      *time.Time  `json:"deleted_at" db:"deleted_at"`
}

func FetchMobileHomeShipmentByMobileHomeShipmentID

func FetchMobileHomeShipmentByMobileHomeShipmentID(db *pop.Connection, mobileHomeShipmentID uuid.UUID) (*MobileHome, error)

Returns a Mobile Home Shipment for a given id

func (MobileHome) TableName

func (mh MobileHome) TableName() string

TableName overrides the table name used by Pop.

func (MobileHome) Validate

func (mh MobileHome) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This should contain validation that is for data integrity. Business validation should occur in service objects.

type MobileHomes

type MobileHomes []MobileHome

A list of Mobile homes

type Move

type Move struct {
	ID                           uuid.UUID             `json:"id" db:"id"`
	Locator                      string                `json:"locator" db:"locator"`
	CreatedAt                    time.Time             `json:"created_at" db:"created_at"`
	UpdatedAt                    time.Time             `json:"updated_at" db:"updated_at"`
	SubmittedAt                  *time.Time            `json:"submitted_at" db:"submitted_at"`
	OrdersID                     uuid.UUID             `json:"orders_id" db:"orders_id"`
	Orders                       Order                 `belongs_to:"orders" fk_id:"orders_id"`
	Status                       MoveStatus            `json:"status" db:"status"`
	SignedCertifications         SignedCertifications  `has_many:"signed_certifications" fk_id:"move_id" order_by:"created_at desc"`
	CancelReason                 *string               `json:"cancel_reason" db:"cancel_reason"`
	Show                         *bool                 `json:"show" db:"show"`
	TIORemarks                   *string               `db:"tio_remarks"`
	AvailableToPrimeAt           *time.Time            `db:"available_to_prime_at"`
	ApprovedAt                   *time.Time            `db:"approved_at"`
	ContractorID                 *uuid.UUID            `db:"contractor_id"`
	Contractor                   *Contractor           `belongs_to:"contractors" fk_id:"contractor_id"`
	PPMType                      *string               `db:"ppm_type"`
	MTOServiceItems              MTOServiceItems       `has_many:"mto_service_items" fk_id:"move_id"`
	PaymentRequests              PaymentRequests       `has_many:"payment_requests" fk_id:"move_id"`
	MTOShipments                 MTOShipments          `has_many:"mto_shipments" fk_id:"move_id"`
	ReferenceID                  *string               `db:"reference_id"`
	ServiceCounselingCompletedAt *time.Time            `db:"service_counseling_completed_at"`
	PrimeCounselingCompletedAt   *time.Time            `db:"prime_counseling_completed_at"`
	ExcessWeightQualifiedAt      *time.Time            `db:"excess_weight_qualified_at"`
	ExcessWeightUploadID         *uuid.UUID            `db:"excess_weight_upload_id"`
	ExcessWeightUpload           *Upload               `belongs_to:"uploads" fk_id:"excess_weight_upload_id"`
	ExcessWeightAcknowledgedAt   *time.Time            `db:"excess_weight_acknowledged_at"`
	BillableWeightsReviewedAt    *time.Time            `db:"billable_weights_reviewed_at"`
	FinancialReviewFlag          bool                  `db:"financial_review_flag"`
	FinancialReviewFlagSetAt     *time.Time            `db:"financial_review_flag_set_at"`
	FinancialReviewRemarks       *string               `db:"financial_review_remarks"`
	ShipmentGBLOC                MoveToGBLOCs          `has_many:"move_to_gbloc" fk_id:"move_id"`
	CloseoutOfficeID             *uuid.UUID            `db:"closeout_office_id"`
	CloseoutOffice               *TransportationOffice `belongs_to:"transportation_offices" fk_id:"closeout_office_id"`
	ApprovalsRequestedAt         *time.Time            `db:"approvals_requested_at"`
	ShipmentSeqNum               *int                  `db:"shipment_seq_num"`
	LockedByOfficeUserID         *uuid.UUID            `json:"locked_by" db:"locked_by"`
	LockedByOfficeUser           *OfficeUser           `belongs_to:"office_users" fk_id:"locked_by"`
	LockExpiresAt                *time.Time            `json:"lock_expires_at" db:"lock_expires_at"`
	AdditionalDocumentsID        *uuid.UUID            `json:"additional_documents_id" db:"additional_documents_id"`
	AdditionalDocuments          *Document             `belongs_to:"documents" fk_id:"additional_documents_id"`
	SCAssignedID                 *uuid.UUID            `json:"sc_assigned_id" db:"sc_assigned_id"`
	SCAssignedUser               *OfficeUser           `belongs_to:"office_users" fk_id:"sc_assigned_id"`
	TOOAssignedID                *uuid.UUID            `json:"too_assigned_id" db:"too_assigned_id"`
	TOOAssignedUser              *OfficeUser           `belongs_to:"office_users" fk_id:"too_assigned_id"`
	TIOAssignedID                *uuid.UUID            `json:"tio_assigned_id" db:"tio_assigned_id"`
	TIOAssignedUser              *OfficeUser           `belongs_to:"office_users" fk_id:"tio_assigned_id"`
	CounselingOfficeID           *uuid.UUID            `json:"counseling_transportation_office_id" db:"counseling_transportation_office_id"`
	CounselingOffice             *TransportationOffice `belongs_to:"transportation_offices" fk_id:"counseling_transportation_office_id"`
}

Move is an object representing a move task order which falls under an "Order" assigned to a service member

func FetchMove

func FetchMove(db *pop.Connection, session *auth.Session, id uuid.UUID) (*Move, error)

FetchMove fetches and validates a Move for this User

func FetchMoveByMoveID

func FetchMoveByMoveID(db *pop.Connection, moveID uuid.UUID) (Move, error)

FetchMoveByMoveID returns a Move for a given id

func FetchMoveByMoveIDWithOrders

func FetchMoveByMoveIDWithOrders(db *pop.Connection, moveID uuid.UUID) (Move, error)

func FetchMoveByOrderID

func FetchMoveByOrderID(db *pop.Connection, orderID uuid.UUID) (Move, error)

FetchMoveByOrderID returns a Move for a given id

func FetchMoveForMoveDates

func FetchMoveForMoveDates(db *pop.Connection, moveID uuid.UUID) (Move, error)

FetchMoveForMoveDates returns a Move along with all the associations needed to determine the move dates summary information.

func (Move) CreateSignedCertification

func (m Move) CreateSignedCertification(db *pop.Connection,
	submittingUserID uuid.UUID,
	certificationText string,
	signature string,
	date time.Time,
	certificationType *SignedCertificationType) (*SignedCertification, *validate.Errors, error)

CreateSignedCertification creates a new SignedCertification associated with this move

func (Move) HasPPM

func (m Move) HasPPM() bool

HasPPM returns true if at least one shipment type is "PPM" associated with the move, false otherwise

func (Move) IsCanceled

func (m Move) IsCanceled() *bool

IsCanceled returns true if the Move's status is `CANCELED`, false otherwise

func (Move) IsPPMOnly

func (m Move) IsPPMOnly() bool

IsPPMOnly returns true of the only type of shipment associate with the move is "PPM", false otherwise

func (Move) TableName

func (m Move) TableName() string

TableName overrides the table name used by Pop.

func (*Move) Validate

func (m *Move) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type MoveHistory

type MoveHistory struct {
	ID             uuid.UUID
	Locator        string
	ReferenceID    *string
	AuditHistories AuditHistories
}

MoveHistory captures a move's audit history. This struct doesn't have a database table it is used for the ghc.yaml/GHC API. NO DATABASE TABLE

type MoveOptions

type MoveOptions struct {
	Show   *bool
	Status *MoveStatus
}

MoveOptions is used when creating new moves based on parameters

type MoveQueueItem

type MoveQueueItem struct {
	ID                          uuid.UUID                       `json:"id" db:"id"`
	CreatedAt                   time.Time                       `json:"created_at" db:"created_at"`
	Edipi                       string                          `json:"edipi" db:"edipi"`
	Grade                       *internalmessages.OrderPayGrade `json:"grade" db:"grade"`
	CustomerName                string                          `json:"customer_name" db:"customer_name"`
	Locator                     string                          `json:"locator" db:"locator"`
	Status                      string                          `json:"status" db:"status"`
	PpmStatus                   *string                         `json:"ppm_status" db:"ppm_status"`
	OrdersType                  string                          `json:"orders_type" db:"orders_type"`
	MoveDate                    *time.Time                      `json:"move_date" db:"move_date"`
	SubmittedDate               *time.Time                      `json:"submitted_date" db:"submitted_date"`
	LastModifiedDate            time.Time                       `json:"last_modified_date" db:"last_modified_date"`
	OriginDutyLocationName      string                          `json:"origin_duty_location_name" db:"origin_duty_location_name"`
	DestinationDutyLocationName string                          `json:"destination_duty_location_name" db:"destination_duty_location_name"`
	PmSurveyConductedDate       *time.Time                      `json:"pm_survey_conducted_date" db:"pm_survey_conducted_date"`
	OriginGBLOC                 *string                         `json:"origin_gbloc" db:"origin_gbloc"`
	DestinationGBLOC            *string                         `json:"destination_gbloc" db:"destination_gbloc"`
	DeliveredDate               *time.Time                      `json:"delivered_date" db:"delivered_date"`
	InvoiceApprovedDate         *time.Time                      `json:"invoice_approved_date" db:"invoice_approved_date"`
	BranchOfService             string                          `json:"branch_of_service" db:"branch_of_service"`
	ActualMoveDate              *time.Time                      `json:"actual_move_date" db:"actual_move_date"`
	OriginalMoveDate            *time.Time                      `json:"original_move_date" db:"original_move_date"`
}

MoveQueueItem represents a single move queue item within a queue.

func GetMoveQueueItems

func GetMoveQueueItems(db *pop.Connection, lifecycleState string) ([]MoveQueueItem, error)

GetMoveQueueItems gets all moveQueueItems for a specific lifecycleState

type MoveStatus

type MoveStatus string

MoveStatus represents the status of an order record's lifecycle

type MoveToGBLOC

type MoveToGBLOC struct {
	MoveID uuid.UUID `db:"move_id"`
	Move   Move      `belongs_to:"moves" fk_id:"move_id"`
	GBLOC  *string   `db:"gbloc"`
}

MoveToGBLOC represents the view that associates each move ID with a GBLOC based on the postal code of its first shipment. This view is used to encapsulate query logic that was impossible to express with Pop. It will be used for the TOO and TIO queues, but not for Services Counseling.

func (MoveToGBLOC) TableName

func (m MoveToGBLOC) TableName() string

TableName overrides the table name used by Pop.

type MoveToGBLOCs

type MoveToGBLOCs []MoveToGBLOC

type Moves

type Moves []Move

func FetchMovesByOrderID

func FetchMovesByOrderID(db *pop.Connection, orderID uuid.UUID) (Moves, error)

FetchMovesByOrderID returns moves for a given id of an order

func GetMovesForUserID

func GetMovesForUserID(db *pop.Connection, userID uuid.UUID) (Moves, error)

GetMovesForUserID gets all move models for a given user ID

type MovingExpense

type MovingExpense struct {
	ID                         uuid.UUID                 `json:"id" db:"id"`
	PPMShipmentID              uuid.UUID                 `json:"ppm_shipment_id" db:"ppm_shipment_id"`
	PPMShipment                PPMShipment               `belongs_to:"ppm_shipments" fk_id:"ppm_shipment_id"`
	DocumentID                 uuid.UUID                 `json:"document_id" db:"document_id"`
	Document                   Document                  `belongs_to:"documents" fk_id:"document_id"`
	CreatedAt                  time.Time                 `json:"created_at" db:"created_at"`
	UpdatedAt                  time.Time                 `json:"updated_at" db:"updated_at"`
	DeletedAt                  *time.Time                `json:"deleted_at" db:"deleted_at"`
	MovingExpenseType          *MovingExpenseReceiptType `json:"moving_expense_type" db:"moving_expense_type"`
	SubmittedMovingExpenseType *MovingExpenseReceiptType `json:"submitted_moving_expense_type" db:"submitted_moving_expense_type"`
	Description                *string                   `json:"description" db:"description"`
	SubmittedDescription       *string                   `json:"submitted_description" db:"submitted_description"`
	PaidWithGTCC               *bool                     `json:"paid_with_gtcc" db:"paid_with_gtcc"`
	Amount                     *unit.Cents               `json:"amount" db:"amount"`
	SubmittedAmount            *unit.Cents               `json:"submitted_amount" db:"submitted_amount"`
	MissingReceipt             *bool                     `json:"missing_receipt" db:"missing_receipt"`
	Status                     *PPMDocumentStatus        `json:"status" db:"status"`
	Reason                     *string                   `json:"reason" db:"reason"`
	SITStartDate               *time.Time                `json:"sit_start_date" db:"sit_start_date"`
	SubmittedSITStartDate      *time.Time                `json:"submitted_sit_start_date" db:"submitted_sit_start_date"`
	SITEndDate                 *time.Time                `json:"sit_end_date" db:"sit_end_date"`
	SubmittedSITEndDate        *time.Time                `json:"submitted_sit_end_date" db:"submitted_sit_end_date"`
	WeightStored               *unit.Pound               `json:"weight_stored" db:"weight_stored"`
	SITLocation                *SITLocationType          `json:"sit_location" db:"sit_location"`
	SITEstimatedCost           *unit.Cents               `json:"sit_estimated_cost" db:"sit_estimated_cost"`
	SITReimburseableAmount     *unit.Cents               `json:"sit_reimburseable_amount" db:"sit_reimburseable_amount"`
}

func (MovingExpense) TableName

func (m MovingExpense) TableName() string

TableName overrides the table name used by Pop.

func (*MovingExpense) Validate

func (m *MovingExpense) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This should contain validation that is for data integrity. Business validation should occur in service objects.

type MovingExpenseReceiptType

type MovingExpenseReceiptType string

MovingExpenseReceiptType represents types of different moving expenses

const (
	// MovingExpenseReceiptTypeContractedExpense captures enum value "CONTRACTED_EXPENSE"
	MovingExpenseReceiptTypeContractedExpense MovingExpenseReceiptType = "CONTRACTED_EXPENSE"
	// MovingExpenseReceiptTypeOil captures enum value "OIL"
	MovingExpenseReceiptTypeOil MovingExpenseReceiptType = "OIL"
	// MovingExpenseReceiptTypePackingMaterials captures enum value "PACKING_MATERIALS"
	MovingExpenseReceiptTypePackingMaterials MovingExpenseReceiptType = "PACKING_MATERIALS"
	// MovingExpenseReceiptTypeRentalEquipment captures enum value "RENTAL_EQUIPMENT"
	MovingExpenseReceiptTypeRentalEquipment MovingExpenseReceiptType = "RENTAL_EQUIPMENT"
	// MovingExpenseReceiptTypeStorage captures enum value "STORAGE"
	MovingExpenseReceiptTypeStorage MovingExpenseReceiptType = "STORAGE"
	// MovingExpenseReceiptTypeTolls captures enum value "TOLLS"
	MovingExpenseReceiptTypeTolls MovingExpenseReceiptType = "TOLLS"
	// MovingExpenseReceiptTypeWeighingFee captures enum value "WEIGHING_FEE"
	MovingExpenseReceiptTypeWeighingFee MovingExpenseReceiptType = "WEIGHING_FEE"
	// MovingExpenseReceiptTypeOther captures enum value "OTHER"
	MovingExpenseReceiptTypeOther MovingExpenseReceiptType = "OTHER"
)

type MovingExpenses

type MovingExpenses []MovingExpense

func (MovingExpenses) FilterDeleted

func (e MovingExpenses) FilterDeleted() MovingExpenses

type MustBeBothNilOrBothHaveValue

type MustBeBothNilOrBothHaveValue struct {
	FieldName1  string
	FieldValue1 *string
	FieldName2  string
	FieldValue2 *string
}

MustBeBothNilOrBothHaveValue validates that two fields are either both nil or both have values

func (*MustBeBothNilOrBothHaveValue) IsValid

func (v *MustBeBothNilOrBothHaveValue) IsValid(errors *validate.Errors)

IsValid adds an error if fieldValue1 or fieldValue2 are neither both empty nor both non-empty

type NotImplementedCountryCode

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

NotImplementedCountryCode is the default for unimplemented country code lookup

func (NotImplementedCountryCode) Error

type Notification

type Notification struct {
	ID               uuid.UUID         `db:"id"`
	ServiceMemberID  uuid.UUID         `db:"service_member_id"`
	ServiceMember    ServiceMember     `belongs_to:"service_member" fk_id:"service_member_id"`
	SESMessageID     string            `db:"ses_message_id"`
	NotificationType NotificationTypes `db:"notification_type"`
	CreatedAt        time.Time         `db:"created_at"`
}

Notification represents an email sent to a service member

func (Notification) TableName

func (n Notification) TableName() string

TableName overrides the table name used by Pop.

func (*Notification) Validate

func (n *Notification) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type NotificationTypes

type NotificationTypes string

NotificationTypes represents types of notifications

const (
	// MovePaymentReminderEmail captures enum value "MOVE_PAYMENT_REMINDER_EMAIL"
	MovePaymentReminderEmail NotificationTypes = "MOVE_PAYMENT_REMINDER_EMAIL"
)

type Notifications

type Notifications []Notification

Notifications is a slice of notification structs

type Obligation

type Obligation struct {
	Gcc   unit.Cents
	SIT   unit.Cents
	Miles unit.Miles
}

Obligation an object representing the obligations section on the shipment summary worksheet

type Obligations

type Obligations struct {
	MaxObligation              Obligation
	ActualObligation           Obligation
	NonWinningMaxObligation    Obligation
	NonWinningActualObligation Obligation
}

Obligations is an object representing the winning and non-winning Max Obligation and Actual Obligation sections of the shipment summary worksheet

type OfficeEmail

type OfficeEmail struct {
	ID                     uuid.UUID            `json:"id" db:"id"`
	TransportationOfficeID uuid.UUID            `json:"transportation_office_id" db:"transportation_office_id"`
	TransportationOffice   TransportationOffice `belongs_to:"transportation_office" fk_id:"transportation_office_id"`
	Email                  string               `json:"email" db:"email"`
	Label                  *string              `json:"label" db:"label"`
	CreatedAt              time.Time            `json:"created_at" db:"created_at"`
	UpdatedAt              time.Time            `json:"updated_at" db:"updated_at"`
}

OfficeEmail is used to store Email addresses for the TransportationOffices

func (OfficeEmail) TableName

func (o OfficeEmail) TableName() string

TableName overrides the table name used by Pop.

func (*OfficeEmail) Validate

func (o *OfficeEmail) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type OfficeEmails

type OfficeEmails []OfficeEmail

type OfficePhoneLine

type OfficePhoneLine struct {
	ID                     uuid.UUID            `json:"id" db:"id"`
	TransportationOfficeID uuid.UUID            `json:"transportation_office_id" db:"transportation_office_id"`
	TransportationOffice   TransportationOffice `belongs_to:"transportation_office" fk_id:"transportation_office_id"`
	Number                 string               `json:"number" db:"number"`
	Label                  *string              `json:"label" db:"label"`
	IsDsnNumber            bool                 `json:"is_dsn_number" db:"is_dsn_number"`
	Type                   string               `json:"type" db:"type"`
	CreatedAt              time.Time            `json:"created_at" db:"created_at"`
	UpdatedAt              time.Time            `json:"updated_at" db:"updated_at"`
}

OfficePhoneLine is used to store Phone lines (voice or fax) for the TransportationOffices

func (OfficePhoneLine) TableName

func (o OfficePhoneLine) TableName() string

TableName overrides the table name used by Pop.

func (*OfficePhoneLine) Validate

func (o *OfficePhoneLine) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type OfficePhoneLines

type OfficePhoneLines []OfficePhoneLine

type OfficeUser

type OfficeUser struct {
	ID                     uuid.UUID            `json:"id" db:"id"`
	UserID                 *uuid.UUID           `json:"user_id" db:"user_id"`
	User                   User                 `belongs_to:"user" fk_id:"user_id"`
	LastName               string               `json:"last_name" db:"last_name"`
	FirstName              string               `json:"first_name" db:"first_name"`
	MiddleInitials         *string              `json:"middle_initials" db:"middle_initials"`
	Email                  string               `json:"email" db:"email"`
	Telephone              string               `json:"telephone" db:"telephone"`
	TransportationOfficeID uuid.UUID            `json:"transportation_office_id" db:"transportation_office_id"`
	TransportationOffice   TransportationOffice `belongs_to:"transportation_office" fk_id:"transportation_office_id"`
	CreatedAt              time.Time            `json:"created_at" db:"created_at"`
	UpdatedAt              time.Time            `json:"updated_at" db:"updated_at"`
	Active                 bool                 `json:"active" db:"active"`
	Status                 *OfficeUserStatus    `json:"status" db:"status"`
	EDIPI                  *string              `json:"edipi" db:"edipi"`
	OtherUniqueID          *string              `json:"other_unique_id" db:"other_unique_id"`
	RejectionReason        *string              `json:"rejection_reason" db:"rejection_reason"`
}

OfficeUser is someone who works in one of the TransportationOffices

func FetchOfficeUserByEmail

func FetchOfficeUserByEmail(tx *pop.Connection, email string) (*OfficeUser, error)

FetchOfficeUserByEmail looks for an office user with a specific email

func FetchOfficeUserByID

func FetchOfficeUserByID(tx *pop.Connection, id uuid.UUID) (*OfficeUser, error)

FetchOfficeUserByID fetches an office user by ID

func (OfficeUser) TableName

func (o OfficeUser) TableName() string

TableName overrides the table name used by Pop.

func (*OfficeUser) Validate

func (o *OfficeUser) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type OfficeUserStatus

type OfficeUserStatus string

OfficeUserStatus represents the status of an office user

const (
	// OfficeUserStatusAPPROVED captures enum value "APPROVED"
	OfficeUserStatusAPPROVED OfficeUserStatus = "APPROVED"
	// OfficeUserStatusREJECTED captures enum value "REJECTED"
	OfficeUserStatusREJECTED OfficeUserStatus = "REJECTED"
	// OfficeUserStatusREQUESTED captures enum value "REQUESTED"
	OfficeUserStatusREQUESTED OfficeUserStatus = "REQUESTED"
)

type OfficeUsers

type OfficeUsers []OfficeUser

type OktaAccountCreationBody

type OktaAccountCreationBody struct {
	Profile  OktaBodyProfile `json:"profile"`
	GroupIds []string        `json:"groupIds"`
}

Okta account POST Req body

type OktaAccountCreationTemplate

type OktaAccountCreationTemplate struct {
	FirstName   string `json:"firstname"`
	LastName    string `json:"lastname"`
	Login       string `json:"login"`
	Email       string `json:"email"`
	MobilePhone string `json:"mobilePhone"`
	CacEdipi    string `json:"cacedipi"`
	GsaID       string `json:"gsaid"`
}

OktaAccountCreationTemplate is a template of information needed in the okta account creation service

type OktaBodyProfile

type OktaBodyProfile struct {
	FirstName   string `json:"firstName"`
	LastName    string `json:"lastName"`
	Email       string `json:"email"`
	Login       string `json:"login"`
	MobilePhone string `json:"mobilePhone"`
	CacEdipi    string `json:"cac_edipi"`
	GsaID       string `json:"gsa_id"`
}

Okta account POST Req body profile

type OktaUser

type OktaUser struct {
	Sub               string `json:"sub"`
	Name              string `json:"name"`
	Locale            string `json:"locale"`
	Email             string `json:"email"`
	PreferredUsername string `json:"preferred_username"`
	FamilyName        string `json:"family_name"`
	GivenName         string `json:"given_name"`
	ZoneInfo          string `json:"zoneinfo"`
	UpdatedAt         int    `json:"updated_at"`
	EmailVerified     bool   `json:"email_verified"`
	Edipi             string `json:"cac_edipi"`
}

type OktaUserPayload

type OktaUserPayload struct {
	Profile  Profile  `json:"profile"`
	GroupIds []string `json:"groupIds"`
}

type OptionalCentIsPositive

type OptionalCentIsPositive struct {
	Name  string
	Field *unit.Cents
}

OptionalCentIsPositive adds an error if the Field is less than or equal to zero

func (*OptionalCentIsPositive) IsValid

func (v *OptionalCentIsPositive) IsValid(errors *validate.Errors)

IsValid adds an error if the Field is less than or equal to zero

type OptionalDateIsWorkday

type OptionalDateIsWorkday struct {
	Name     string
	Field    *time.Time
	Calendar *cal.BusinessCalendar
}

OptionalDateIsWorkday validates that a field is on a workday if it exists

func (*OptionalDateIsWorkday) IsValid

func (v *OptionalDateIsWorkday) IsValid(errors *validate.Errors)

IsValid adds error if field is not on valid workday ignores nil field

type OptionalDateNotBefore

type OptionalDateNotBefore struct {
	Name    string
	Field   *time.Time
	MinDate *time.Time
}

OptionalDateNotBefore validates that a date is not before the earliest allowable date

func (*OptionalDateNotBefore) IsValid

func (v *OptionalDateNotBefore) IsValid(errors *validate.Errors)

IsValid adds an error if the field has a value and there is not a not-before date or the date is before the not-before date

type OptionalInt64IsPositive

type OptionalInt64IsPositive struct {
	Name  string
	Field *int64
}

OptionalInt64IsPositive adds an error if the Field is less than or equal to zero

func (*OptionalInt64IsPositive) IsValid

func (v *OptionalInt64IsPositive) IsValid(errors *validate.Errors)

IsValid adds an error if the Field is less than or equal to zero

type OptionalIntIsPositive

type OptionalIntIsPositive struct {
	Name  string
	Field *int
}

OptionalIntIsPositive adds an error if the Field is less than or equal to zero

func (*OptionalIntIsPositive) IsValid

func (v *OptionalIntIsPositive) IsValid(errors *validate.Errors)

IsValid adds an error if the Field is less than or equal to zero

type OptionalPoundIsNonNegative

type OptionalPoundIsNonNegative struct {
	Name  string
	Field *unit.Pound
}

OptionalPoundIsNonNegative adds an error if the Field is less than zero

func (*OptionalPoundIsNonNegative) IsValid

func (v *OptionalPoundIsNonNegative) IsValid(errors *validate.Errors)

IsValid adds an error if the Field is less than zero

type OptionalPoundIsPositive

type OptionalPoundIsPositive struct {
	Name  string
	Field *unit.Pound
}

OptionalPoundIsPositive adds an error if the Field is less than or equal to zero

func (*OptionalPoundIsPositive) IsValid

func (v *OptionalPoundIsPositive) IsValid(errors *validate.Errors)

IsValid adds an error if the Field is less than zero

type OptionalRegexMatch

type OptionalRegexMatch struct {
	Name    string
	Field   *string
	Expr    string
	Message string
}

OptionalRegexMatch validates that a field matches the regexp match

func (*OptionalRegexMatch) IsValid

func (v *OptionalRegexMatch) IsValid(errors *validate.Errors)

IsValid performs the validation based on the regexp match

type OptionalStringInclusion

type OptionalStringInclusion struct {
	Name    string
	Field   *string
	List    []string
	Message string
}

OptionalStringInclusion validates that a field is in a list of strings if the field exists

func (*OptionalStringInclusion) IsValid

func (v *OptionalStringInclusion) IsValid(errors *validate.Errors)

IsValid adds error if field is non-nil and not in the list of strings

type OptionalTimeIsPresent

type OptionalTimeIsPresent struct {
	Name    string
	Field   *time.Time
	Message string
}

OptionalTimeIsPresent adds an error if the Field is not nil and also not a valid time

func (*OptionalTimeIsPresent) IsValid

func (v *OptionalTimeIsPresent) IsValid(errors *validate.Errors)

IsValid adds an error if the Field is not nil and also not a valid time

type OptionalTimeIsPresentAndNotNil

type OptionalTimeIsPresentAndNotNil struct {
	Name    string
	Field   *time.Time
	Message string
}

func (*OptionalTimeIsPresentAndNotNil) IsValid

func (v *OptionalTimeIsPresentAndNotNil) IsValid(errors *validate.Errors)

type OptionalUUIDIsPresent

type OptionalUUIDIsPresent struct {
	Name    string
	Field   *uuid.UUID
	Message string
}

OptionalUUIDIsPresent is a structure for determining if an Optional UUID is valid If it is a nil pointer, it passes validation. If it is a pointer to a valid UUID, it passes validation. If it is a pointer to a non-valid UUID, it fails validation.

func (*OptionalUUIDIsPresent) IsValid

func (v *OptionalUUIDIsPresent) IsValid(errors *validate.Errors)

IsValid adds an error if an optional UUID is valid. If it is a nil pointer, it passes validation. If it is a pointer to a valid UUID, it passes validation. If it is a pointer to a non-valid UUID, it fails validation.

type Order

type Order struct {
	ID                             uuid.UUID                          `json:"id" db:"id"`
	CreatedAt                      time.Time                          `json:"created_at" db:"created_at"`
	UpdatedAt                      time.Time                          `json:"updated_at" db:"updated_at"`
	ServiceMemberID                uuid.UUID                          `json:"service_member_id" db:"service_member_id"`
	ServiceMember                  ServiceMember                      `belongs_to:"service_members" fk_id:"service_member_id"`
	IssueDate                      time.Time                          `json:"issue_date" db:"issue_date"`
	ReportByDate                   time.Time                          `json:"report_by_date" db:"report_by_date"`
	OrdersType                     internalmessages.OrdersType        `json:"orders_type" db:"orders_type"`
	OrdersTypeDetail               *internalmessages.OrdersTypeDetail `json:"orders_type_detail" db:"orders_type_detail"`
	HasDependents                  bool                               `json:"has_dependents" db:"has_dependents"`
	SpouseHasProGear               bool                               `json:"spouse_has_pro_gear" db:"spouse_has_pro_gear"`
	OriginDutyLocation             *DutyLocation                      `belongs_to:"duty_locations" fk_id:"origin_duty_location_id"`
	OriginDutyLocationID           *uuid.UUID                         `json:"origin_duty_location_id" db:"origin_duty_location_id"`
	NewDutyLocationID              uuid.UUID                          `json:"new_duty_location_id" db:"new_duty_location_id"`
	NewDutyLocation                DutyLocation                       `belongs_to:"duty_locations" fk_id:"new_duty_location_id"`
	DestinationGBLOC               *string                            `json:"destination_duty_location_gbloc" db:"destination_gbloc"`
	UploadedOrders                 Document                           `belongs_to:"documents" fk_id:"uploaded_orders_id"`
	UploadedOrdersID               uuid.UUID                          `json:"uploaded_orders_id" db:"uploaded_orders_id"`
	OrdersNumber                   *string                            `json:"orders_number" db:"orders_number"`
	Moves                          Moves                              `has_many:"moves" fk_id:"orders_id" order_by:"created_at desc"`
	Status                         OrderStatus                        `json:"status" db:"status"`
	TAC                            *string                            `json:"tac" db:"tac"`
	SAC                            *string                            `json:"sac" db:"sac"`
	NtsTAC                         *string                            `json:"nts_tac" db:"nts_tac"`
	NtsSAC                         *string                            `json:"nts_sac" db:"nts_sac"`
	DepartmentIndicator            *string                            `json:"department_indicator" db:"department_indicator"`
	Grade                          *internalmessages.OrderPayGrade    `json:"grade" db:"grade"`
	Entitlement                    *Entitlement                       `belongs_to:"entitlements" fk_id:"entitlement_id"`
	EntitlementID                  *uuid.UUID                         `json:"entitlement_id" db:"entitlement_id"`
	UploadedAmendedOrders          *Document                          `belongs_to:"documents" fk_id:"uploaded_amended_orders_id"`
	UploadedAmendedOrdersID        *uuid.UUID                         `json:"uploaded_amended_orders_id" db:"uploaded_amended_orders_id"`
	AmendedOrdersAcknowledgedAt    *time.Time                         `json:"amended_orders_acknowledged_at" db:"amended_orders_acknowledged_at"`
	OriginDutyLocationGBLOC        *string                            `json:"origin_duty_location_gbloc" db:"gbloc"`
	SupplyAndServicesCostEstimate  string                             `json:"supply_and_services_cost_estimate" db:"supply_and_services_cost_estimate"`
	PackingAndShippingInstructions string                             `json:"packing_and_shipping_instructions" db:"packing_and_shipping_instructions"`
	MethodOfPayment                string                             `json:"method_of_payment" db:"method_of_payment"`
	NAICS                          string                             `json:"naics" db:"naics"`
	ProvidesServicesCounseling     *bool                              `belongs_to:"duty_locations" fk_id:"origin_duty_location_id"`
}

Order is a set of orders received by a service member

func FetchLatestOrder

func FetchLatestOrder(session *auth.Session, db *pop.Connection) (Order, error)

FetchLatestOrder gets the latest order for a service member

func FetchOrder

func FetchOrder(db *pop.Connection, id uuid.UUID) (Order, error)

FetchOrder returns orders without REGARDLESS OF USER. DO NOT USE IF YOU NEED USER AUTH

func FetchOrderAmendmentsInfo

func FetchOrderAmendmentsInfo(db *pop.Connection, session *auth.Session, id uuid.UUID) (Order, error)

Fetch order containing only base amendment information

func FetchOrderForPDFConversion

func FetchOrderForPDFConversion(db *pop.Connection, id uuid.UUID) (Order, error)

FetchOrderForPDFConversion returns orders and any attached uploads

func FetchOrderForUser

func FetchOrderForUser(db *pop.Connection, session *auth.Session, id uuid.UUID) (Order, error)

FetchOrderForUser returns orders only if it is allowed for the given user to access those orders.

func (*Order) CanSendEmailWithOrdersType

func (o *Order) CanSendEmailWithOrdersType() bool

func (*Order) Cancel

func (o *Order) Cancel() error

Cancel cancels the Order

func (*Order) CreateNewMove

func (o *Order) CreateNewMove(db *pop.Connection, moveOptions MoveOptions) (*Move, *validate.Errors, error)

CreateNewMove creates a move associated with these Orders

func (*Order) IsComplete

func (o *Order) IsComplete() bool

IsComplete checks if orders have all fields necessary to approve a move

func (*Order) IsCompleteForGBL

func (o *Order) IsCompleteForGBL() bool

IsCompleteForGBL checks if orders have all fields necessary to generate a GBL

func (*Order) Submit

func (o *Order) Submit() error

Submit submits the Order

func (Order) TableName

func (o Order) TableName() string

TableName overrides the table name used by Pop.

func (*Order) Validate

func (o *Order) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type OrderStatus

type OrderStatus string

OrderStatus represents the state of an order record in the UX manual orders flow

const (
	// OrderStatusDRAFT captures enum value "DRAFT"
	OrderStatusDRAFT OrderStatus = "DRAFT"
	// OrderStatusSUBMITTED captures enum value "SUBMITTED"
	OrderStatusSUBMITTED OrderStatus = "SUBMITTED"
	// OrderStatusAPPROVED captures enum value "APPROVED"
	OrderStatusAPPROVED OrderStatus = "APPROVED"
	// OrderStatusCANCELED captures enum value "CANCELED"
	OrderStatusCANCELED OrderStatus = "CANCELED"
)

type Orders

type Orders []Order

type OrdersTypeIsPresent

type OrdersTypeIsPresent struct {
	Name  string
	Field internalmessages.OrdersType
}

OrdersTypeIsPresent validates that orders type field is present

func (*OrdersTypeIsPresent) IsValid

func (v *OrdersTypeIsPresent) IsValid(errors *validate.Errors)

IsValid adds an error if the string value is blank.

type Organization

type Organization struct {
	ID        uuid.UUID `json:"id" db:"id"`
	CreatedAt time.Time `json:"created_at" db:"created_at"`
	UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
	Name      string    `json:"name" db:"name"`
	PocEmail  *string   `json:"poc_email" db:"poc_email"`
	PocPhone  *string   `json:"poc_phone" db:"poc_phone"`
}

Organization represents an organization and their contact information

func (Organization) String

func (o Organization) String() string

func (Organization) TableName

func (o Organization) TableName() string

TableName overrides the table name used by Pop.

func (*Organization) Validate

func (o *Organization) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type Organizations

type Organizations []Organization

func (Organizations) String

func (o Organizations) String() string

type PPMActualWeight

type PPMActualWeight struct {
	ActualWeight *unit.Pound
}

type PPMAdvanceStatus

type PPMAdvanceStatus string

PPMAdvanceStatus represents the status of an advance that can be approved, edited or rejected by a SC

const (
	// PPMAdvanceStatusApproved captures enum value "APPROVED"
	PPMAdvanceStatusApproved PPMAdvanceStatus = "APPROVED"
	// PPMAdvanceStatusEdited captures enum value "EDITED"
	PPMAdvanceStatusEdited PPMAdvanceStatus = "EDITED"
	// PPMAdvanceStatusRejected captures enum value "REJECTED"
	PPMAdvanceStatusRejected PPMAdvanceStatus = "REJECTED"
	// PPMAdvanceStatusReceived captures enum value "RECEIVED"
	PPMAdvanceStatusReceived PPMAdvanceStatus = "RECEIVED"
	// PPMAdvanceStatusNotReceived captures enum value "NOT RECEIVED"
	PPMAdvanceStatusNotReceived PPMAdvanceStatus = "NOT_RECEIVED"
)

type PPMCloseout

type PPMCloseout struct {
	ID                    *uuid.UUID
	PlannedMoveDate       *time.Time
	ActualMoveDate        *time.Time
	Miles                 *int
	EstimatedWeight       *unit.Pound
	ActualWeight          *unit.Pound
	ProGearWeightCustomer *unit.Pound
	ProGearWeightSpouse   *unit.Pound
	GrossIncentive        *unit.Cents
	GCC                   *unit.Cents
	AOA                   *unit.Cents
	RemainingIncentive    *unit.Cents
	HaulPrice             *unit.Cents
	HaulFSC               *unit.Cents
	HaulType              HaulType
	DOP                   *unit.Cents
	DDP                   *unit.Cents
	PackPrice             *unit.Cents
	UnpackPrice           *unit.Cents
	SITReimbursement      *unit.Cents
}

type PPMDocumentStatus

type PPMDocumentStatus string

PPMDocumentStatus represents the status of a PPMShipment's documents. Lives here since we have multiple PPM document models.

const (
	// PPMDocumentStatusApproved captures enum value "DRAFT"
	PPMDocumentStatusDRAFT PPMDocumentStatus = "DRAFT"
	// PPMDocumentStatusApproved captures enum value "APPROVED"
	PPMDocumentStatusApproved PPMDocumentStatus = "APPROVED"
	// PPMDocumentStatusExcluded captures enum value "EXCLUDED"
	PPMDocumentStatusExcluded PPMDocumentStatus = "EXCLUDED"
	// PPMDocumentStatusRejected captures enum value "REJECTED"
	PPMDocumentStatusRejected PPMDocumentStatus = "REJECTED"
)

type PPMDocuments

type PPMDocuments struct {
	WeightTickets
	MovingExpenses
	ProgearWeightTickets
}

PPMDocuments is a collection of the different PPMShipment documents. This type exists mainly to make it easier to work with the group of documents as a whole when we don't actually retrieve the PPM Shipment itself.

type PPMSITEstimatedCost

type PPMSITEstimatedCost struct {
	PPMSITEstimatedCost *unit.Pound
}

type PPMSITEstimatedCostInfo

type PPMSITEstimatedCostInfo struct {
	EstimatedSITCost       *unit.Cents
	PriceFirstDaySIT       *unit.Cents
	PriceAdditionalDaySIT  *unit.Cents
	ParamsFirstDaySIT      PPMSITEstimatedCostParams
	ParamsAdditionalDaySIT PPMSITEstimatedCostParams
}

type PPMSITEstimatedCostParams

type PPMSITEstimatedCostParams struct {
	ContractYearName       string
	PriceRateOrFactor      string
	IsPeak                 string
	EscalationCompounded   string
	ServiceAreaOrigin      string
	ServiceAreaDestination string
	NumberDaysSIT          string
}

type PPMShipment

type PPMShipment struct {
	ID                             uuid.UUID            `json:"id" db:"id"`
	ShipmentID                     uuid.UUID            `json:"shipment_id" db:"shipment_id"`
	Shipment                       MTOShipment          `belongs_to:"mto_shipments" fk_id:"shipment_id"`
	CreatedAt                      time.Time            `json:"created_at" db:"created_at"`
	UpdatedAt                      time.Time            `json:"updated_at" db:"updated_at"`
	DeletedAt                      *time.Time           `json:"deleted_at" db:"deleted_at"`
	Status                         PPMShipmentStatus    `json:"status" db:"status"`
	ExpectedDepartureDate          time.Time            `json:"expected_departure_date" db:"expected_departure_date"`
	ActualMoveDate                 *time.Time           `json:"actual_move_date" db:"actual_move_date"`
	SubmittedAt                    *time.Time           `json:"submitted_at" db:"submitted_at"`
	ReviewedAt                     *time.Time           `json:"reviewed_at" db:"reviewed_at"`
	ApprovedAt                     *time.Time           `json:"approved_at" db:"approved_at"`
	W2Address                      *Address             `belongs_to:"addresses" fk_id:"w2_address_id"`
	W2AddressID                    *uuid.UUID           `db:"w2_address_id"`
	PickupAddress                  *Address             `belongs_to:"addresses" fk_id:"pickup_postal_address_id"`
	PickupAddressID                *uuid.UUID           `db:"pickup_postal_address_id"`
	SecondaryPickupAddress         *Address             `belongs_to:"addresses" fk_id:"secondary_pickup_postal_address_id"`
	SecondaryPickupAddressID       *uuid.UUID           `db:"secondary_pickup_postal_address_id"`
	HasSecondaryPickupAddress      *bool                `db:"has_secondary_pickup_address"`
	TertiaryPickupAddress          *Address             `belongs_to:"addresses" fk_id:"tertiary_pickup_postal_address_id"`
	TertiaryPickupAddressID        *uuid.UUID           `db:"tertiary_pickup_postal_address_id"`
	HasTertiaryPickupAddress       *bool                `db:"has_tertiary_pickup_address"`
	ActualPickupPostalCode         *string              `json:"actual_pickup_postal_code" db:"actual_pickup_postal_code"`
	DestinationAddress             *Address             `belongs_to:"addresses" fk_id:"destination_postal_address_id"`
	DestinationAddressID           *uuid.UUID           `db:"destination_postal_address_id"`
	SecondaryDestinationAddress    *Address             `belongs_to:"addresses" fk_id:"secondary_destination_postal_address_id"`
	SecondaryDestinationAddressID  *uuid.UUID           `db:"secondary_destination_postal_address_id"`
	HasSecondaryDestinationAddress *bool                `db:"has_secondary_destination_address"`
	TertiaryDestinationAddress     *Address             `belongs_to:"addresses" fk_id:"tertiary_destination_postal_address_id"`
	TertiaryDestinationAddressID   *uuid.UUID           `db:"tertiary_destination_postal_address_id"`
	HasTertiaryDestinationAddress  *bool                `db:"has_tertiary_destination_address"`
	ActualDestinationPostalCode    *string              `json:"actual_destination_postal_code" db:"actual_destination_postal_code"`
	EstimatedWeight                *unit.Pound          `json:"estimated_weight" db:"estimated_weight"`
	HasProGear                     *bool                `json:"has_pro_gear" db:"has_pro_gear"`
	ProGearWeight                  *unit.Pound          `json:"pro_gear_weight" db:"pro_gear_weight"`
	SpouseProGearWeight            *unit.Pound          `json:"spouse_pro_gear_weight" db:"spouse_pro_gear_weight"`
	EstimatedIncentive             *unit.Cents          `json:"estimated_incentive" db:"estimated_incentive"`
	FinalIncentive                 *unit.Cents          `json:"final_incentive" db:"final_incentive"`
	HasRequestedAdvance            *bool                `json:"has_requested_advance" db:"has_requested_advance"`
	AdvanceAmountRequested         *unit.Cents          `json:"advance_amount_requested" db:"advance_amount_requested"`
	HasReceivedAdvance             *bool                `json:"has_received_advance" db:"has_received_advance"`
	AdvanceStatus                  *PPMAdvanceStatus    `json:"advance_status" db:"advance_status"`
	AdvanceAmountReceived          *unit.Cents          `json:"advance_amount_received" db:"advance_amount_received"`
	SITExpected                    *bool                `json:"sit_expected" db:"sit_expected"`
	SITLocation                    *SITLocationType     `json:"sit_location" db:"sit_location"`
	SITEstimatedWeight             *unit.Pound          `json:"sit_estimated_weight" db:"sit_estimated_weight"`
	SITEstimatedEntryDate          *time.Time           `json:"sit_estimated_entry_date" db:"sit_estimated_entry_date"`
	SITEstimatedDepartureDate      *time.Time           `json:"sit_estimated_departure_date" db:"sit_estimated_departure_date"`
	SITEstimatedCost               *unit.Cents          `json:"sit_estimated_cost" db:"sit_estimated_cost"`
	WeightTickets                  WeightTickets        `has_many:"weight_tickets" fk_id:"ppm_shipment_id" order_by:"created_at asc"`
	MovingExpenses                 MovingExpenses       `has_many:"moving_expenses" fk_id:"ppm_shipment_id" order_by:"created_at asc"`
	ProgearWeightTickets           ProgearWeightTickets `has_many:"progear_weight_tickets" fk_id:"ppm_shipment_id" order_by:"created_at asc"`
	SignedCertification            *SignedCertification `has_one:"signed_certification" fk_id:"ppm_id"`
	AOAPacketID                    *uuid.UUID           `json:"aoa_packet_id" db:"aoa_packet_id"`
	AOAPacket                      *Document            `belongs_to:"documents" fk_id:"aoa_packet_id"`
	PaymentPacketID                *uuid.UUID           `json:"payment_packet_id" db:"payment_packet_id"`
	PaymentPacket                  *Document            `belongs_to:"documents" fk_id:"payment_packet_id"`
}

PPMShipment is the portion of a move that a service member performs themselves

func FetchPPMShipmentByPPMShipmentID

func FetchPPMShipmentByPPMShipmentID(db *pop.Connection, ppmShipmentID uuid.UUID) (*PPMShipment, error)

FetchPPMShipmentByPPMShipmentID returns a PPM Shipment for a given id

func (*PPMShipment) CancelShipment

func (p *PPMShipment) CancelShipment() error

Cancel marks the PPM as Canceled

func (PPMShipment) TableName

func (p PPMShipment) TableName() string

TableName overrides the table name used by Pop.

func (PPMShipment) Validate

func (p PPMShipment) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This should contain validation that is for data integrity. Business validation should occur in service objects.

type PPMShipmentStatus

type PPMShipmentStatus string

PPMShipmentStatus represents the status of an order record's lifecycle

const (
	// PPMShipmentStatusCancelled captures enum value "DRAFT"
	PPMShipmentStatusCancelled PPMShipmentStatus = "CANCELLED"
	// PPMShipmentStatusDraft captures enum value "DRAFT"
	PPMShipmentStatusDraft PPMShipmentStatus = "DRAFT"
	// PPMShipmentStatusSubmitted captures enum value "SUBMITTED"
	PPMShipmentStatusSubmitted PPMShipmentStatus = "SUBMITTED"
	// PPMShipmentStatusWaitingOnCustomer captures enum value "WAITING_ON_CUSTOMER"
	PPMShipmentStatusWaitingOnCustomer PPMShipmentStatus = "WAITING_ON_CUSTOMER"
	// PPMShipmentStatusNeedsAdvanceApproval captures enum value "NEEDS_ADVANCE_APPROVAL"
	PPMShipmentStatusNeedsAdvanceApproval PPMShipmentStatus = "NEEDS_ADVANCE_APPROVAL"
	// PPMShipmentStatusNeedsCloseout captures enum value "NEEDS_CLOSEOUT"
	PPMShipmentStatusNeedsCloseout PPMShipmentStatus = "NEEDS_CLOSEOUT"
	// PPMShipmentStatusCloseoutComplete captures enum value "CLOSEOUT_COMPLETE"
	PPMShipmentStatusCloseoutComplete PPMShipmentStatus = "CLOSEOUT_COMPLETE"
	// PPMStatusCOMPLETED captures enum value "COMPLETED"
	PPMShipmentStatusComplete PPMShipmentStatus = "COMPLETED"
)

type PPMShipments

type PPMShipments []PPMShipment

PPMShipments is a list of PPMs

type PWSViolation

type PWSViolation struct {
	ID                   uuid.UUID            `json:"id" db:"id"`
	DisplayOrder         int                  `json:"display_order" db:"display_order"`
	ParagraphNumber      string               `db:"paragraph_number"`
	Title                string               `db:"title"`
	Category             PWSViolationCategory `db:"category"`
	SubCategory          string               `db:"sub_category"`
	RequirementSummary   string               `db:"requirement_summary"`
	RequirementStatement string               `db:"requirement_statement"`
	IsKpi                bool                 `db:"is_kpi"`
	AdditionalDataElem   string               `db:"additional_data_elem"`
}

func (PWSViolation) TableName

func (p PWSViolation) TableName() string

TableName overrides the table name used by Pop.

type PWSViolationCategory

type PWSViolationCategory string
const (
	PWSViolationCategoryPreMoveServices      PWSViolationCategory = "Pre-Move Services"
	PWSViolationCategoryPhysicalMoveServices PWSViolationCategory = "Physical Move Services"
	PWSViolationCategoryLiability            PWSViolationCategory = "Liability"
)

type PWSViolations

type PWSViolations []PWSViolation

type Paygrade

type Paygrade string

Paygrade is the "rank" of a member. Some of these paygrades will have identical entitlements.

const (
	// PaygradeAviationCadet captures enum value "aviation-cadet"
	PaygradeAviationCadet Paygrade = "aviation-cadet"
	// PaygradeCadet captures enum value "cadet"
	PaygradeCadet Paygrade = "cadet"
	// PaygradeCivilian captures enum value "civilian"
	PaygradeCivilian Paygrade = "civilian"
	// PaygradeE1 captures enum value "e-1"
	PaygradeE1 Paygrade = "e-1"
	// PaygradeE2 captures enum value "e-2"
	PaygradeE2 Paygrade = "e-2"
	// PaygradeE3 captures enum value "e-3"
	PaygradeE3 Paygrade = "e-3"
	// PaygradeE4 captures enum value "e-4"
	PaygradeE4 Paygrade = "e-4"
	// PaygradeE5 captures enum value "e-5"
	PaygradeE5 Paygrade = "e-5"
	// PaygradeE6 captures enum value "e-6"
	PaygradeE6 Paygrade = "e-6"
	// PaygradeE7 captures enum value "e-7"
	PaygradeE7 Paygrade = "e-7"
	// PaygradeE8 captures enum value "e-8"
	PaygradeE8 Paygrade = "e-8"
	// PaygradeE9 captures enum value "e-9"
	PaygradeE9 Paygrade = "e-9"
	// PaygradeMidshipman captures enum value "midshipman"
	PaygradeMidshipman Paygrade = "midshipman"
	// PaygradeO1 captures enum value "o-1"
	PaygradeO1 Paygrade = "o-1"
	// PaygradeO2 captures enum value "o-2"
	PaygradeO2 Paygrade = "o-2"
	// PaygradeO3 captures enum value "o-3"
	PaygradeO3 Paygrade = "o-3"
	// PaygradeO4 captures enum value "o-4"
	PaygradeO4 Paygrade = "o-4"
	// PaygradeO5 captures enum value "o-5"
	PaygradeO5 Paygrade = "o-5"
	// PaygradeO6 captures enum value "o-6"
	PaygradeO6 Paygrade = "o-6"
	// PaygradeO7 captures enum value "o-7"
	PaygradeO7 Paygrade = "o-7"
	// PaygradeO8 captures enum value "o-8"
	PaygradeO8 Paygrade = "o-8"
	// PaygradeO9 captures enum value "o-9"
	PaygradeO9 Paygrade = "o-9"
	// PaygradeO10 captures enum value "o-10"
	PaygradeO10 Paygrade = "o-10"
	// PaygradeW1 captures enum value "w-1"
	PaygradeW1 Paygrade = "w-1"
	// PaygradeW2 captures enum value "w-2"
	PaygradeW2 Paygrade = "w-2"
	// PaygradeW3 captures enum value "w-3"
	PaygradeW3 Paygrade = "w-3"
	// PaygradeW4 captures enum value "w-4"
	PaygradeW4 Paygrade = "w-4"
	// PaygradeW5 captures enum value "w-5"
	PaygradeW5 Paygrade = "w-5"
)

type PaymentRequest

type PaymentRequest struct {
	ID                              uuid.UUID            `json:"id" db:"id"`
	MoveTaskOrderID                 uuid.UUID            `db:"move_id"`
	IsFinal                         bool                 `json:"is_final" db:"is_final"`
	Status                          PaymentRequestStatus `json:"status" db:"status"`
	RejectionReason                 *string              `json:"rejection_reason" db:"rejection_reason"`
	PaymentRequestNumber            string               `json:"payment_request_number" db:"payment_request_number"`
	SequenceNumber                  int                  `json:"sequence_number" db:"sequence_number"`
	RequestedAt                     time.Time            `json:"requested_at" db:"requested_at"`
	ReviewedAt                      *time.Time           `json:"reviewed_at" db:"reviewed_at"`
	SentToGexAt                     *time.Time           `json:"sent_to_gex_at" db:"sent_to_gex_at"`
	ReceivedByGexAt                 *time.Time           `json:"received_by_gex_at" db:"received_by_gex_at"`
	PaidAt                          *time.Time           `json:"paid_at" db:"paid_at"`
	CreatedAt                       time.Time            `db:"created_at"`
	UpdatedAt                       time.Time            `db:"updated_at"`
	RecalculationOfPaymentRequestID *uuid.UUID           `json:"recalculation_of_payment_request_id" db:"recalculation_of_payment_request_id"`

	// Associations
	MoveTaskOrder                 Move                        `belongs_to:"moves" fk_id:"move_id"`
	PaymentServiceItems           PaymentServiceItems         `has_many:"payment_service_items" fk_id:"payment_request_id"`
	ProofOfServiceDocs            ProofOfServiceDocs          `has_many:"proof_of_service_docs" fk_id:"payment_request_id"`
	EdiErrors                     EdiErrors                   `has_many:"edi_errors" fk_id:"payment_request_id"`
	RecalculationOfPaymentRequest *PaymentRequest             `belongs_to:"payment_requests" fk_id:"recalculation_of_payment_request_id"`
	TPPSPaidInvoiceReports        TPPSPaidInvoiceReportEntrys `has_many:"tpps_paid_invoice_reports" fk_id:"payment_request_number"`
}

PaymentRequest is an object representing a payment request on a move task order

func (PaymentRequest) TableName

func (p PaymentRequest) TableName() string

TableName overrides the table name used by Pop.

func (*PaymentRequest) Validate

func (p *PaymentRequest) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type PaymentRequestStatus

type PaymentRequestStatus string

PaymentRequestStatus is a type of Payment Request Status

const (
	// PaymentRequestStatusPending is pending
	PaymentRequestStatusPending PaymentRequestStatus = "PENDING"
	// PaymentRequestStatusReviewed is reviewed
	PaymentRequestStatusReviewed PaymentRequestStatus = "REVIEWED"
	// PaymentRequestStatusReviewedAllRejected is reviewed
	PaymentRequestStatusReviewedAllRejected PaymentRequestStatus = "REVIEWED_AND_ALL_SERVICE_ITEMS_REJECTED"
	// PaymentRequestStatusSentToGex is sent to gex
	PaymentRequestStatusSentToGex PaymentRequestStatus = "SENT_TO_GEX"
	// PaymentRequestStatusTppsReceived is received by gex
	PaymentRequestStatusTppsReceived PaymentRequestStatus = "TPPS_RECEIVED"
	// PaymentRequestStatusPaid is paid
	PaymentRequestStatusPaid PaymentRequestStatus = "PAID"
	// PaymentRequestStatusEDIError an error has occurred
	PaymentRequestStatusEDIError PaymentRequestStatus = "EDI_ERROR"
	// PaymentRequestStatusDeprecated is deprecated
	PaymentRequestStatusDeprecated PaymentRequestStatus = "DEPRECATED"
)

func (PaymentRequestStatus) String

func (p PaymentRequestStatus) String() string

String is a string representation of a Payment Request Status

type PaymentRequestToInterchangeControlNumber

type PaymentRequestToInterchangeControlNumber struct {
	ID                       uuid.UUID `db:"id"`
	PaymentRequestID         uuid.UUID `db:"payment_request_id"`
	InterchangeControlNumber int       `db:"interchange_control_number"`
	EDIType                  EDIType   `db:"edi_type"`

	// Associations
	PaymentRequest PaymentRequest `belongs_to:"payment_requests" fk_id:"payment_request_id"`
}

PaymentRequestToInterchangeControlNumber is an object that links payment requests to an Interchange Control Number used in the EDI 858 invoice

func (PaymentRequestToInterchangeControlNumber) TableName

TableName overrides the table name used by Pop.

func (*PaymentRequestToInterchangeControlNumber) Validate

func (p *PaymentRequestToInterchangeControlNumber) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type PaymentRequests

type PaymentRequests []PaymentRequest

PaymentRequests is a slice of PaymentRequest

type PaymentServiceItem

type PaymentServiceItem struct {
	ID               uuid.UUID                `json:"id" db:"id"`
	PaymentRequestID uuid.UUID                `json:"payment_request_id" db:"payment_request_id"`
	MTOServiceItemID uuid.UUID                `json:"mto_service_item_id" db:"mto_service_item_id"`
	Status           PaymentServiceItemStatus `json:"status" db:"status"`
	PriceCents       *unit.Cents              `json:"price_cents" db:"price_cents"`
	RejectionReason  *string                  `json:"rejection_reason" db:"rejection_reason"`
	RequestedAt      time.Time                `json:"requested_at" db:"requested_at"`
	ApprovedAt       *time.Time               `json:"approved_at" db:"approved_at"`
	DeniedAt         *time.Time               `json:"denied_at" db:"denied_at"`
	SentToGexAt      *time.Time               `json:"sent_to_gex_at" db:"sent_to_gex_at"`
	PaidAt           *time.Time               `json:"paid_at" db:"paid_at"`
	ReferenceID      string                   `json:"reference_id" db:"reference_id"`
	CreatedAt        time.Time                `db:"created_at"`
	UpdatedAt        time.Time                `db:"updated_at"`

	//Associations
	PaymentRequest           PaymentRequest           `belongs_to:"payment_request" fk_id:"payment_request_id"`
	MTOServiceItem           MTOServiceItem           `belongs_to:"mto_service_item" fk_id:"mto_service_item_id"`
	PaymentServiceItemParams PaymentServiceItemParams `has_many:"payment_service_item_params" fk_id:"payment_service_item_id"`
}

PaymentServiceItem represents a payment service item

func (*PaymentServiceItem) BeforeCreate

func (p *PaymentServiceItem) BeforeCreate(db *pop.Connection) error

BeforeCreate is a Pop callback that is called before a PaymentServiceItem is created.

func (*PaymentServiceItem) GeneratePSIReferenceID

func (p *PaymentServiceItem) GeneratePSIReferenceID(db *pop.Connection) (string, error)

GeneratePSIReferenceID returns a reference ID for the PaymentServiceItem it is being called on. The format should be <MTO reference ID>-<part of PSI ID to make it unique>

func (PaymentServiceItem) TableName

func (p PaymentServiceItem) TableName() string

TableName overrides the table name used by Pop.

func (*PaymentServiceItem) Validate

func (p *PaymentServiceItem) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type PaymentServiceItemParam

type PaymentServiceItemParam struct {
	ID                    uuid.UUID `json:"id" db:"id"`
	PaymentServiceItemID  uuid.UUID `json:"payment_service_item_id" db:"payment_service_item_id"`
	ServiceItemParamKeyID uuid.UUID `json:"service_item_param_key_id" db:"service_item_param_key_id"`
	Value                 string    `json:"value" db:"value"`
	CreatedAt             time.Time `db:"created_at"`
	UpdatedAt             time.Time `db:"updated_at"`

	// Associations
	PaymentServiceItem  PaymentServiceItem  `belongs_to:"payment_service_item" fk_id:"payment_service_item_id"`
	ServiceItemParamKey ServiceItemParamKey `belongs_to:"service_item_param_key" fk_id:"service_item_param_key_id"`

	// Used to lookup the appropriate ServiceItemParamKeyID when creating a PaymentServiceItemParam
	IncomingKey string `db:"-"`
}

PaymentServiceItemParam represents a parameter of the Payment Service Item

func (PaymentServiceItemParam) TableName

func (p PaymentServiceItemParam) TableName() string

TableName overrides the table name used by Pop.

func (*PaymentServiceItemParam) Validate

func (p *PaymentServiceItemParam) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type PaymentServiceItemParams

type PaymentServiceItemParams []PaymentServiceItemParam

type PaymentServiceItemStatus

type PaymentServiceItemStatus string

PaymentServiceItemStatus is a type of Payment Service Item Status

const (
	// PaymentServiceItemStatusRequested is the requested status
	PaymentServiceItemStatusRequested PaymentServiceItemStatus = "REQUESTED"
	// PaymentServiceItemStatusApproved is the approved status
	PaymentServiceItemStatusApproved PaymentServiceItemStatus = "APPROVED"
	// PaymentServiceItemStatusDenied is the denied status
	PaymentServiceItemStatusDenied PaymentServiceItemStatus = "DENIED"
	// PaymentServiceItemStatusSentToGex is the sent-to-gex status
	PaymentServiceItemStatusSentToGex PaymentServiceItemStatus = "SENT_TO_GEX"
	// PaymentServiceItemStatusPaid is the paid status
	PaymentServiceItemStatusPaid PaymentServiceItemStatus = "PAID"
	// PaymentServiceItemStatusEDIError is an error status
	PaymentServiceItemStatusEDIError PaymentServiceItemStatus = "EDI_ERROR"

	// PaymentServiceItemMaxReferenceIDLength is the maximum overall length allowed for a reference ID
	// (given the EDI field's max length)
	PaymentServiceItemMaxReferenceIDLength = 30
	// PaymentServiceItemMinReferenceIDSuffixLength is the minimum suffix length for the PSI's reference ID
	PaymentServiceItemMinReferenceIDSuffixLength = 8
)

func (PaymentServiceItemStatus) String

func (p PaymentServiceItemStatus) String() string

PaymentServiceItemStatus is a string representation of a Payment Service Item Status

type PaymentServiceItems

type PaymentServiceItems []PaymentServiceItem

type PostalCodeToGBLOC

type PostalCodeToGBLOC struct {
	ID         uuid.UUID `db:"id"`
	PostalCode string    `db:"postal_code"`
	GBLOC      string    `db:"gbloc"`
	CreatedAt  time.Time `db:"created_at"`
	UpdatedAt  time.Time `db:"updated_at"`
}

PostalCodeToGBLOC is a mapping from Postal Codes to GBLOCs

func FetchGBLOCForPostalCode

func FetchGBLOCForPostalCode(db *pop.Connection, postalCode string) (PostalCodeToGBLOC, error)

Fetches the GBLOC for a specific Postal Code

func (PostalCodeToGBLOC) TableName

func (p PostalCodeToGBLOC) TableName() string

TableName overrides the table name used by Pop.

type PostalCodeToGBLOCs

type PostalCodeToGBLOCs []PostalCodeToGBLOC

type PrimeUpload

type PrimeUpload struct {
	ID                  uuid.UUID         `db:"id"`
	ProofOfServiceDocID uuid.UUID         `db:"proof_of_service_docs_id"`
	ProofOfServiceDoc   ProofOfServiceDoc `belongs_to:"proof_of_service_docs" fk_id:"proof_of_service_docs_id"`
	ContractorID        uuid.UUID         `db:"contractor_id"`
	Contractor          Contractor        `belongs_to:"contractors" fk_id:"contractor_id"`
	UploadID            uuid.UUID         `db:"upload_id"`
	Upload              Upload            `belongs_to:"uploads" fk_id:"upload_id"`
	CreatedAt           time.Time         `db:"created_at"`
	UpdatedAt           time.Time         `db:"updated_at"`
	DeletedAt           *time.Time        `db:"deleted_at"`
}

An PrimeUpload represents an user uploaded file, such as an image or PDF.

func FetchPrimeUpload

func FetchPrimeUpload(db *pop.Connection, contractorID uuid.UUID, id uuid.UUID) (PrimeUpload, error)

FetchPrimeUpload returns an PrimeUpload if the contractor has access to that upload

func (PrimeUpload) TableName

func (u PrimeUpload) TableName() string

TableName overrides the table name used by Pop.

func (*PrimeUpload) Validate

func (u *PrimeUpload) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type PrimeUploads

type PrimeUploads []PrimeUpload

func (PrimeUploads) FilterDeleted

func (u PrimeUploads) FilterDeleted() PrimeUploads

type Privilege

type Privilege struct {
	ID            uuid.UUID     `json:"id" db:"id"`
	PrivilegeType PrivilegeType `json:"privilege_type" db:"privilege_type"`
	PrivilegeName PrivilegeName `json:"privilege_name" db:"privilege_name"`
	CreatedAt     time.Time     `json:"created_at" db:"created_at"`
	UpdatedAt     time.Time     `json:"updated_at" db:"updated_at"`
}

Privilege represents a Privilege for users

func (Privilege) TableName

func (r Privilege) TableName() string

TableName overrides the table name used by Pop.

func (*Privilege) Validate

func (r *Privilege) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type PrivilegeName

type PrivilegeName string

PrivilegeName represents the names of privileges

type PrivilegeType

type PrivilegeType string

PrivilegeType represents the types of privileges available in the admin app

const (
	// PrivilegeTypeSupervisor is the Task Ordering Officer Role
	PrivilegeTypeSupervisor PrivilegeType = "supervisor"
	PrivilegeTypeSafety     PrivilegeType = "safety"
)
const (
	// PrivilegeTypeSupervisor is the Task Ordering Officer Role
	PrivilegeSearchTypeSupervisor PrivilegeType = "SUPERVISOR"
	PrivilegeSearchTypeSafety     PrivilegeType = "SAFETY"
)

type Privileges

type Privileges []Privilege

Privileges is a slice of Privilege objects

func FetchPrivilegesForUser

func FetchPrivilegesForUser(db *pop.Connection, userID uuid.UUID) (Privileges, error)

FetchPrivilegesForUser gets the active PrivilegeTypes for the user

func (Privileges) GetPrivilege

func (rs Privileges) GetPrivilege(privilegeType PrivilegeType) (Privilege, bool)

GetPrivilege returns the privilege a Privilege Type

func (Privileges) HasPrivilege

func (rs Privileges) HasPrivilege(privilegeType PrivilegeType) bool

HasPrivilege validates if Privilege has a privilege of a particular type

type Profile

type Profile struct {
	FirstName   string `json:"firstName"`
	LastName    string `json:"lastName"`
	Email       string `json:"email"`
	Login       string `json:"login"`
	MobilePhone string `json:"mobilePhone"`
}

type ProgearWeightTicket

type ProgearWeightTicket struct {
	ID                        uuid.UUID          `json:"id" db:"id"`
	PPMShipmentID             uuid.UUID          `json:"ppm_shipment_id" db:"ppm_shipment_id"`
	PPMShipment               PPMShipment        `belongs_to:"ppm_shipments" fk_id:"ppm_shipment_id"`
	BelongsToSelf             *bool              `json:"belongs_to_self" db:"belongs_to_self"`
	SubmittedBelongsToSelf    *bool              `json:"submitted_belongs_to_self" db:"submitted_belongs_to_self"`
	Description               *string            `json:"description" db:"description"`
	HasWeightTickets          *bool              `json:"has_weight_tickets" db:"has_weight_tickets"`
	SubmittedHasWeightTickets *bool              `json:"submitted_has_weight_tickets" db:"submitted_has_weight_tickets"`
	Weight                    *unit.Pound        `json:"weight" db:"weight"`
	SubmittedWeight           *unit.Pound        `json:"submitted_weight" db:"submitted_weight"`
	DocumentID                uuid.UUID          `json:"document_id" db:"document_id"`
	Document                  Document           `belongs_to:"documents" fk_id:"document_id"`
	Status                    *PPMDocumentStatus `json:"status" db:"status"`
	Reason                    *string            `json:"reason" db:"reason"`
	CreatedAt                 time.Time          `json:"created_at" db:"created_at"`
	UpdatedAt                 time.Time          `json:"updated_at" db:"updated_at"`
	DeletedAt                 *time.Time         `json:"deleted_at" db:"deleted_at"`
}

func (ProgearWeightTicket) TableName

func (p ProgearWeightTicket) TableName() string

TableName overrides the table name used by Pop.

func (*ProgearWeightTicket) Validate

func (p *ProgearWeightTicket) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This should contain validation that is for data integrity. Business validation should occur in service objects.

type ProgearWeightTickets

type ProgearWeightTickets []ProgearWeightTicket

func (ProgearWeightTickets) FilterDeleted

func (e ProgearWeightTickets) FilterDeleted() ProgearWeightTickets

type ProofOfServiceDoc

type ProofOfServiceDoc struct {
	ID               uuid.UUID `json:"id" db:"id"`
	PaymentRequestID uuid.UUID `json:"payment_request_id" db:"payment_request_id"`
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
	IsWeightTicket   bool      `db:"is_weight_ticket"`

	//Associations
	PaymentRequest PaymentRequest `belongs_to:"payment_request" fk_id:"payment_request_id"`
	PrimeUploads   PrimeUploads   `has_many:"prime_uploads" fk_id:"proof_of_service_docs_id" order_by:"created_at asc"`
}

ProofOfServiceDoc represents a document for proof of service

func (ProofOfServiceDoc) TableName

func (p ProofOfServiceDoc) TableName() string

TableName overrides the table name used by Pop.

func (*ProofOfServiceDoc) Validate

func (p *ProofOfServiceDoc) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ProofOfServiceDocs

type ProofOfServiceDocs []ProofOfServiceDoc

type ReContract

type ReContract struct {
	ID        uuid.UUID `json:"id" db:"id"`
	Code      string    `json:"code" db:"code"`
	Name      string    `json:"name" db:"name"`
	CreatedAt time.Time `json:"created_at" db:"created_at"`
	UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}

ReContract represents a contract with pricing information

func (ReContract) TableName

func (r ReContract) TableName() string

TableName overrides the table name used by Pop.

func (*ReContract) Validate

func (r *ReContract) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReContractYear

type ReContractYear struct {
	ID                   uuid.UUID `json:"id" db:"id"`
	ContractID           uuid.UUID `json:"contract_id" db:"contract_id"`
	Name                 string    `json:"name" db:"name"`
	StartDate            time.Time `json:"start_date" db:"start_date"`
	EndDate              time.Time `json:"end_date" db:"end_date"`
	Escalation           float64   `json:"escalation" db:"escalation"`
	EscalationCompounded float64   `json:"escalation_compounded" db:"escalation_compounded"`
	CreatedAt            time.Time `json:"created_at" db:"created_at"`
	UpdatedAt            time.Time `json:"updated_at" db:"updated_at"`

	// Associations
	Contract ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
}

ReContractYear represents a single "year" of a contract

func (ReContractYear) TableName

func (r ReContractYear) TableName() string

TableName overrides the table name used by Pop.

func (*ReContractYear) Validate

func (r *ReContractYear) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReContractYears

type ReContractYears []ReContractYear

type ReContracts

type ReContracts []ReContract

type ReDomesticAccessorialPrice

type ReDomesticAccessorialPrice struct {
	ID               uuid.UUID  `json:"id" db:"id"`
	ContractID       uuid.UUID  `json:"contract_id" db:"contract_id"`
	ServiceID        uuid.UUID  `json:"service_id" db:"service_id"`
	ServicesSchedule int        `json:"services_schedule" db:"services_schedule"`
	PerUnitCents     unit.Cents `json:"per_unit_cents" db:"per_unit_cents"`
	CreatedAt        time.Time  `json:"created_at" db:"created_at"`
	UpdatedAt        time.Time  `json:"updated_at" db:"updated_at"`

	//associations
	Contract ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
	Service  ReService  `belongs_to:"re_service" fk_id:"service_id"`
}

ReDomesticAccessorialPrice model struct

func (ReDomesticAccessorialPrice) TableName

func (r ReDomesticAccessorialPrice) TableName() string

TableName overrides the table name used by Pop.

func (*ReDomesticAccessorialPrice) Validate

func (r *ReDomesticAccessorialPrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReDomesticAccessorialPrices

type ReDomesticAccessorialPrices []ReDomesticAccessorialPrice

type ReDomesticLinehaulPrice

type ReDomesticLinehaulPrice struct {
	ID                    uuid.UUID       `json:"id" db:"id"`
	ContractID            uuid.UUID       `json:"contract_id" db:"contract_id"`
	WeightLower           unit.Pound      `json:"weight_lower" db:"weight_lower"`
	WeightUpper           unit.Pound      `json:"weight_upper" db:"weight_upper"`
	MilesLower            int             `json:"miles_lower" db:"miles_lower"`
	MilesUpper            int             `json:"miles_upper" db:"miles_upper"`
	IsPeakPeriod          bool            `json:"is_peak_period" db:"is_peak_period"`
	DomesticServiceAreaID uuid.UUID       `json:"domestic_service_area_id" db:"domestic_service_area_id"`
	PriceMillicents       unit.Millicents `json:"price_millicents" db:"price_millicents"`
	CreatedAt             time.Time       `json:"created_at" db:"created_at"`
	UpdatedAt             time.Time       `json:"updated_at" db:"updated_at"`

	// Associations
	Contract            ReContract            `belongs_to:"re_contract" fk_id:"contract_id"`
	DomesticServiceArea ReDomesticServiceArea `belongs_to:"re_domestic_service_area" fk_id:"domestic_service_area_id"`
}

ReDomesticLinehaulPrice represents a domestic linehaul price based on weight, mileage, etc.

func (ReDomesticLinehaulPrice) TableName

func (r ReDomesticLinehaulPrice) TableName() string

TableName overrides the table name used by Pop.

func (*ReDomesticLinehaulPrice) Validate

func (r *ReDomesticLinehaulPrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReDomesticLinehaulPrices

type ReDomesticLinehaulPrices []ReDomesticLinehaulPrice

type ReDomesticOtherPrice

type ReDomesticOtherPrice struct {
	ID           uuid.UUID  `json:"id" db:"id"`
	ContractID   uuid.UUID  `json:"contract_id" db:"contract_id"`
	ServiceID    uuid.UUID  `json:"service_id" db:"service_id"`
	IsPeakPeriod bool       `json:"is_peak_period" db:"is_peak_period"`
	Schedule     int        `json:"schedule" db:"schedule"`
	PriceCents   unit.Cents `json:"price_cents" db:"price_cents"`
	CreatedAt    time.Time  `json:"created_at" db:"created_at"`
	UpdatedAt    time.Time  `json:"updated_at" db:"updated_at"`

	// Associations
	Contract ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
	Service  ReService  `belongs_to:"re_service" fk_id:"service_id"`
}

ReDomesticOtherPrice represents a domestic service area price based on date, service area, etc.

func (ReDomesticOtherPrice) TableName

func (r ReDomesticOtherPrice) TableName() string

TableName overrides the table name used by Pop.

func (*ReDomesticOtherPrice) Validate

func (r *ReDomesticOtherPrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReDomesticOtherPrices

type ReDomesticOtherPrices []ReDomesticOtherPrice

type ReDomesticServiceArea

type ReDomesticServiceArea struct {
	ID               uuid.UUID `json:"id" db:"id"`
	ContractID       uuid.UUID `json:"contract_id" db:"contract_id"`
	ServiceArea      string    `json:"service_area" db:"service_area"`
	ServicesSchedule int       `json:"services_schedule" db:"services_schedule"`
	SITPDSchedule    int       `json:"sit_pd_schedule" db:"sit_pd_schedule"`
	CreatedAt        time.Time `json:"created_at" db:"created_at"`
	UpdatedAt        time.Time `json:"updated_at" db:"updated_at"`

	// Associations
	Contract ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
}

ReDomesticServiceArea model struct

func (ReDomesticServiceArea) TableName

func (r ReDomesticServiceArea) TableName() string

TableName overrides the table name used by Pop.

func (*ReDomesticServiceArea) Validate

func (r *ReDomesticServiceArea) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReDomesticServiceAreaPrice

type ReDomesticServiceAreaPrice struct {
	ID                    uuid.UUID  `json:"id" db:"id"`
	ContractID            uuid.UUID  `json:"contract_id" db:"contract_id"`
	ServiceID             uuid.UUID  `json:"service_id" db:"service_id"`
	IsPeakPeriod          bool       `json:"is_peak_period" db:"is_peak_period"`
	DomesticServiceAreaID uuid.UUID  `json:"domestic_service_area_id" db:"domestic_service_area_id"`
	PriceCents            unit.Cents `json:"price_cents" db:"price_cents"`
	CreatedAt             time.Time  `json:"created_at" db:"created_at"`
	UpdatedAt             time.Time  `json:"updated_at" db:"updated_at"`

	// Associations
	Contract            ReContract            `belongs_to:"re_contract" fk_id:"contract_id"`
	Service             ReService             `belongs_to:"re_service" fk_id:"service_id"`
	DomesticServiceArea ReDomesticServiceArea `belongs_to:"re_domestic_service_area" fk_id:"domestic_service_area_id"`
}

ReDomesticServiceAreaPrice represents a domestic service area price based on date, service area, etc.

func (ReDomesticServiceAreaPrice) TableName

func (r ReDomesticServiceAreaPrice) TableName() string

TableName overrides the table name used by Pop.

func (*ReDomesticServiceAreaPrice) Validate

func (r *ReDomesticServiceAreaPrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReDomesticServiceAreaPrices

type ReDomesticServiceAreaPrices []ReDomesticServiceAreaPrice

type ReDomesticServiceAreas

type ReDomesticServiceAreas []ReDomesticServiceArea

type ReIntlAccessorialPrice

type ReIntlAccessorialPrice struct {
	ID           uuid.UUID  `json:"id" db:"id"`
	ContractID   uuid.UUID  `json:"contract_id" db:"contract_id"`
	ServiceID    uuid.UUID  `json:"service_id" db:"service_id"`
	Market       Market     `json:"market" db:"market"`
	PerUnitCents unit.Cents `json:"per_unit_cents" db:"per_unit_cents"`
	CreatedAt    time.Time  `json:"created_at" db:"created_at"`
	UpdatedAt    time.Time  `json:"updated_at" db:"updated_at"`

	//associations
	Contract ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
	Service  ReService  `belongs_to:"re_service" fk_id:"service_id"`
}

ReIntlAccessorialPrice model struct

func (ReIntlAccessorialPrice) TableName

func (r ReIntlAccessorialPrice) TableName() string

TableName overrides the table name used by Pop.

func (*ReIntlAccessorialPrice) Validate

func (r *ReIntlAccessorialPrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReIntlAccessorialPrices

type ReIntlAccessorialPrices []ReIntlAccessorialPrice

type ReIntlOtherPrice

type ReIntlOtherPrice struct {
	ID           uuid.UUID  `json:"id" db:"id"`
	ContractID   uuid.UUID  `json:"contract_id" db:"contract_id"`
	ServiceID    uuid.UUID  `json:"service_id" db:"service_id"`
	RateAreaID   uuid.UUID  `json:"rate_area_id" db:"rate_area_id"`
	IsPeakPeriod bool       `json:"is_peak_period" db:"is_peak_period"`
	PerUnitCents unit.Cents `json:"per_unit_cents" db:"per_unit_cents"`
	CreatedAt    time.Time  `json:"created_at" db:"created_at"`
	UpdatedAt    time.Time  `json:"updated_at" db:"updated_at"`

	// Associations
	Contract ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
	Service  ReService  `belongs_to:"re_service" fk_id:"service_id"`
	RateArea ReRateArea `belongs_to:"re_rate_area" fk_id:"rate_area_id"`
}

ReIntlOtherPrice is the ghc rate engine international price

func (ReIntlOtherPrice) TableName

func (r ReIntlOtherPrice) TableName() string

TableName overrides the table name used by Pop.

func (*ReIntlOtherPrice) Validate

func (r *ReIntlOtherPrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReIntlOtherPrices

type ReIntlOtherPrices []ReIntlOtherPrice

ReIntlOtherPrices is a slice of ReIntlOtherPrice

type ReIntlPrice

type ReIntlPrice struct {
	ID                    uuid.UUID  `json:"id" db:"id"`
	ContractID            uuid.UUID  `json:"contract_id" db:"contract_id"`
	ServiceID             uuid.UUID  `json:"service_id" db:"service_id"`
	OriginRateAreaID      uuid.UUID  `json:"origin_rate_area_id" db:"origin_rate_area_id"`
	DestinationRateAreaID uuid.UUID  `json:"destination_rate_area_id" db:"destination_rate_area_id"`
	IsPeakPeriod          bool       `json:"is_peak_period" db:"is_peak_period"`
	PerUnitCents          unit.Cents `json:"per_unit_cents" db:"per_unit_cents"`
	CreatedAt             time.Time  `json:"created_at" db:"created_at"`
	UpdatedAt             time.Time  `json:"updated_at" db:"updated_at"`

	// Associations
	Contract            ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
	Service             ReService  `belongs_to:"re_service" fk_id:"service_id"`
	OriginRateArea      ReRateArea `belongs_to:"re_rate_area" fk_id:"origin_rate_area_id"`
	DestinationRateArea ReRateArea `belongs_to:"re_rate_area" fk_id:"destination_rate_area_id"`
}

ReIntlPrice is the ghc rate engine international price

func (ReIntlPrice) TableName

func (r ReIntlPrice) TableName() string

TableName overrides the table name used by Pop.

func (*ReIntlPrice) Validate

func (r *ReIntlPrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReIntlPrices

type ReIntlPrices []ReIntlPrice

ReIntlPrices is a slice of ReIntlPrice objects

type ReRateArea

type ReRateArea struct {
	ID         uuid.UUID `json:"id" db:"id"`
	ContractID uuid.UUID `json:"contract_id" db:"contract_id"`
	IsOconus   bool      `json:"is_oconus" db:"is_oconus"`
	Code       string    `json:"code" db:"code"`
	Name       string    `json:"name" db:"name"`
	CreatedAt  time.Time `json:"created_at" db:"created_at"`
	UpdatedAt  time.Time `json:"updated_at" db:"updated_at"`

	// Associations
	Contract ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
}

ReRateArea model struct

func FetchReRateAreaItem

func FetchReRateAreaItem(tx *pop.Connection, contractID uuid.UUID, code string) (*ReRateArea, error)

FetchReRateAreaItem returns an area for a matching code

func (ReRateArea) TableName

func (r ReRateArea) TableName() string

TableName overrides the table name used by Pop.

func (*ReRateArea) Validate

func (r *ReRateArea) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReRateAreas

type ReRateAreas []ReRateArea

type ReService

type ReService struct {
	ID        uuid.UUID     `json:"id" db:"id"`
	Code      ReServiceCode `json:"code" db:"code"`
	Priority  int           `db:"priority"`
	Name      string        `json:"name" db:"name"`
	CreatedAt time.Time     `json:"created_at" db:"created_at"`
	UpdatedAt time.Time     `json:"updated_at" db:"updated_at"`
}

ReService model struct

func (ReService) TableName

func (r ReService) TableName() string

TableName overrides the table name used by Pop.

func (*ReService) Validate

func (r *ReService) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReServiceCode

type ReServiceCode string

ReServiceCode is the code of service

const (
	// ReServiceCodeCS Counseling
	ReServiceCodeCS ReServiceCode = "CS"
	// ReServiceCodeDBHF Domestic haul away boat factor
	ReServiceCodeDBHF ReServiceCode = "DBHF"
	// ReServiceCodeDBTF Domestic tow away boat factor
	ReServiceCodeDBTF ReServiceCode = "DBTF"
	// ReServiceCodeDCRT Domestic crating
	ReServiceCodeDCRT ReServiceCode = "DCRT"
	// ReServiceCodeDCRTSA Domestic crating - standalone
	ReServiceCodeDCRTSA ReServiceCode = "DCRTSA"
	// ReServiceCodeDDASIT Domestic destination add'l SIT
	ReServiceCodeDDASIT ReServiceCode = "DDASIT"
	// ReServiceCodeDDDSIT Domestic destination SIT delivery
	ReServiceCodeDDDSIT ReServiceCode = "DDDSIT"
	// ReServiceCodeDDSFSC Domestic destination SIT FSC
	ReServiceCodeDDSFSC ReServiceCode = "DDSFSC"
	// ReServiceCodeDDFSIT Domestic destination 1st day SIT
	ReServiceCodeDDFSIT ReServiceCode = "DDFSIT"
	// ReServiceCodeDDP Domestic destination price
	ReServiceCodeDDP ReServiceCode = "DDP"
	// ReServiceCodeDDSHUT Domestic destination shuttle service
	ReServiceCodeDDSHUT ReServiceCode = "DDSHUT"
	// ReServiceCodeDLH Domestic linehaul
	ReServiceCodeDLH ReServiceCode = "DLH"
	// ReServiceCodeDMHF Domestic mobile home factor
	ReServiceCodeDMHF ReServiceCode = "DMHF"
	// ReServiceCodeDNPK Domestic NTS packing
	ReServiceCodeDNPK ReServiceCode = "DNPK"
	// ReServiceCodeDOASIT Domestic origin add'l SIT
	ReServiceCodeDOASIT ReServiceCode = "DOASIT"
	// ReServiceCodeDOFSIT Domestic origin 1st day SIT
	ReServiceCodeDOFSIT ReServiceCode = "DOFSIT"
	// ReServiceCodeDOP Domestic origin price
	ReServiceCodeDOP ReServiceCode = "DOP"
	// ReServiceCodeDOPSIT Domestic origin SIT pickup
	ReServiceCodeDOPSIT ReServiceCode = "DOPSIT"
	// ReServiceCodeDOSFSC Domestic origin SIT FSC
	ReServiceCodeDOSFSC ReServiceCode = "DOSFSC"
	// ReServiceCodeDOSHUT Domestic origin shuttle service
	ReServiceCodeDOSHUT ReServiceCode = "DOSHUT"
	// ReServiceCodeDPK Domestic packing
	ReServiceCodeDPK ReServiceCode = "DPK"
	// ReServiceCodeDSH Domestic shorthaul
	ReServiceCodeDSH ReServiceCode = "DSH"
	// ReServiceCodeDUCRT Domestic uncrating
	ReServiceCodeDUCRT ReServiceCode = "DUCRT"
	// ReServiceCodeDUPK Domestic unpacking
	ReServiceCodeDUPK ReServiceCode = "DUPK"
	// ReServiceCodeFSC Fuel Surcharge
	ReServiceCodeFSC ReServiceCode = "FSC"
	// ReServiceCodeIBHF International haul away boat factor
	ReServiceCodeIBHF ReServiceCode = "IBHF"
	// ReServiceCodeIBTF International tow away boat factor
	ReServiceCodeIBTF ReServiceCode = "IBTF"
	// ReServiceCodeICOLH International C->O shipping & LH
	ReServiceCodeICOLH ReServiceCode = "ICOLH"
	// ReServiceCodeICOUB International C->O UB
	ReServiceCodeICOUB ReServiceCode = "ICOUB"
	// ReServiceCodeICRT International crating
	ReServiceCodeICRT ReServiceCode = "ICRT"
	// ReServiceCodeICRTSA International crating - standalone
	ReServiceCodeICRTSA ReServiceCode = "ICRTSA"
	// ReServiceCodeIDASIT International destination add'l day SIT
	ReServiceCodeIDASIT ReServiceCode = "IDASIT"
	// ReServiceCodeIDDSIT International destination SIT delivery
	ReServiceCodeIDDSIT ReServiceCode = "IDDSIT"
	// ReServiceCodeIDFSIT International destination 1st day SIT
	ReServiceCodeIDFSIT ReServiceCode = "IDFSIT"
	// ReServiceCodeIDSHUT International destination shuttle service
	ReServiceCodeIDSHUT ReServiceCode = "IDSHUT"
	// ReServiceCodeIHPK International HHG pack
	ReServiceCodeIHPK ReServiceCode = "IHPK"
	// ReServiceCodeIHUPK International HHG unpack
	ReServiceCodeIHUPK ReServiceCode = "IHUPK"
	// ReServiceCodeINPK International NTS packing
	ReServiceCodeINPK ReServiceCode = "INPK"
	// ReServiceCodeIOASIT International origin add'l day SIT
	ReServiceCodeIOASIT ReServiceCode = "IOASIT"
	// ReServiceCodeIOCLH International O->C shipping & LH
	ReServiceCodeIOCLH ReServiceCode = "IOCLH"
	// ReServiceCodeIOCUB International O->C UB
	ReServiceCodeIOCUB ReServiceCode = "IOCUB"
	// ReServiceCodeIOFSIT International origin 1st day SIT
	ReServiceCodeIOFSIT ReServiceCode = "IOFSIT"
	// ReServiceCodeIOOLH International O->O shipping & LH
	ReServiceCodeIOOLH ReServiceCode = "IOOLH"
	// ReServiceCodeIOOUB International O->O UB
	ReServiceCodeIOOUB ReServiceCode = "IOOUB"
	// ReServiceCodeIOPSIT International origin SIT pickup
	ReServiceCodeIOPSIT ReServiceCode = "IOPSIT"
	// ReServiceCodeIOSHUT International origin shuttle service
	ReServiceCodeIOSHUT ReServiceCode = "IOSHUT"
	// ReServiceCodeIUBPK International UB pack
	ReServiceCodeIUBPK ReServiceCode = "IUBPK"
	// ReServiceCodeIUBUPK International UB unpack
	ReServiceCodeIUBUPK ReServiceCode = "IUBUPK"
	// ReServiceCodeIUCRT International uncrating
	ReServiceCodeIUCRT ReServiceCode = "IUCRT"
	// ReServiceCodeMS Move management
	ReServiceCodeMS ReServiceCode = "MS"
	// ReServiceCodeNSTH Nonstandard HHG
	ReServiceCodeNSTH ReServiceCode = "NSTH"
	// ReServiceCodeNSTUB Nonstandard UB
	ReServiceCodeNSTUB ReServiceCode = "NSTUB"
)

func (ReServiceCode) String

func (r ReServiceCode) String() string

type ReServices

type ReServices []ReService

type ReShipmentTypePrice

type ReShipmentTypePrice struct {
	ID         uuid.UUID `json:"id" db:"id"`
	ContractID uuid.UUID `json:"contract_id" db:"contract_id"`
	ServiceID  uuid.UUID `json:"service_id" db:"service_id"`
	Market     Market    `json:"market" db:"market"`
	Factor     float64   `json:"factor" db:"factor"`
	CreatedAt  time.Time `json:"created_at" db:"created_at"`
	UpdatedAt  time.Time `json:"updated_at" db:"updated_at"`

	//Associations
	Contract ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
	Service  ReService  `belongs_to:"re_service" fk_id:"service_id"`
}

ReShipmentTypePrice model struct

func (ReShipmentTypePrice) TableName

func (r ReShipmentTypePrice) TableName() string

TableName overrides the table name used by Pop.

func (*ReShipmentTypePrice) Validate

func (r *ReShipmentTypePrice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReShipmentTypePrices

type ReShipmentTypePrices []ReShipmentTypePrice

type ReTaskOrderFee

type ReTaskOrderFee struct {
	ID             uuid.UUID  `json:"id" db:"id"`
	ContractYearID uuid.UUID  `json:"contract_year_id" db:"contract_year_id"`
	ServiceID      uuid.UUID  `json:"service_id" db:"service_id"`
	PriceCents     unit.Cents `json:"price_cents" db:"price_cents"`
	CreatedAt      time.Time  `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time  `json:"updated_at" db:"updated_at"`

	//Associations
	ContractYear ReContractYear `belongs_to:"re_contract_year" fk_id:"contract_year_id"`
	Service      ReService      `belongs_to:"re_service" fk_id:"service_id"`
}

ReTaskOrderFee model struct

func (ReTaskOrderFee) TableName

func (r ReTaskOrderFee) TableName() string

TableName overrides the table name used by Pop.

func (*ReTaskOrderFee) Validate

func (r *ReTaskOrderFee) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReTaskOrderFees

type ReTaskOrderFees []ReTaskOrderFee

type ReZip3

type ReZip3 struct {
	ID                    uuid.UUID  `json:"id" db:"id"`
	ContractID            uuid.UUID  `json:"contract_id" db:"contract_id"`
	Zip3                  string     `json:"zip3" db:"zip3"`
	BasePointCity         string     `json:"base_point_city" db:"base_point_city"`
	State                 string     `json:"state" db:"state"`
	DomesticServiceAreaID uuid.UUID  `json:"domestic_service_area_id" db:"domestic_service_area_id"`
	RateAreaID            *uuid.UUID `json:"rate_area_id" db:"rate_area_id"`
	HasMultipleRateAreas  bool       `json:"has_multiple_rate_areas" db:"has_multiple_rate_areas"`
	CreatedAt             time.Time  `json:"created_at" db:"created_at"`
	UpdatedAt             time.Time  `json:"updated_at" db:"updated_at"`

	// Associations
	Contract            ReContract            `belongs_to:"re_contract" fk_id:"contract_id"`
	DomesticServiceArea ReDomesticServiceArea `belongs_to:"re_domestic_service_areas" fk_id:"domestic_service_area_id"`
	RateArea            *ReRateArea           `belongs_to:"re_rate_areas" fk_id:"rate_area_id"`
}

ReZip3 model struct

func FetchReZip3Item

func FetchReZip3Item(tx *pop.Connection, zip3 string) (*ReZip3, error)

FetchReZip3Item returns an reZip3 for a given zip3

func (ReZip3) TableName

func (r ReZip3) TableName() string

TableName overrides the table name used by Pop.

func (*ReZip3) Validate

func (r *ReZip3) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReZip3s

type ReZip3s []ReZip3

type ReZip5RateArea

type ReZip5RateArea struct {
	ID         uuid.UUID `json:"id" db:"id"`
	ContractID uuid.UUID `json:"contract_id" db:"contract_id"`
	Zip5       string    `json:"zip5" db:"zip5"`
	RateAreaID uuid.UUID `json:"rate_area_id" db:"rate_area_id"`
	CreatedAt  time.Time `json:"created_at" db:"created_at"`
	UpdatedAt  time.Time `json:"updated_at" db:"updated_at"`

	// Associations
	Contract ReContract `belongs_to:"re_contract" fk_id:"contract_id"`
	RateArea ReRateArea `belongs_to:"re_rate_areas" fk_id:"rate_area_id"`
}

ReZip5RateArea model struct

func (ReZip5RateArea) TableName

func (r ReZip5RateArea) TableName() string

TableName overrides the table name used by Pop.

func (*ReZip5RateArea) Validate

func (r *ReZip5RateArea) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReZip5RateAreas

type ReZip5RateAreas []ReZip5RateArea

type Reimbursement

type Reimbursement struct {
	ID              uuid.UUID           `json:"id" db:"id"`
	CreatedAt       time.Time           `json:"created_at" db:"created_at"`
	UpdatedAt       time.Time           `json:"updated_at" db:"updated_at"`
	RequestedAmount unit.Cents          `json:"requested_amount" db:"requested_amount"`
	MethodOfReceipt MethodOfReceipt     `json:"method_of_receipt" db:"method_of_receipt"`
	Status          ReimbursementStatus `json:"status" db:"status"`
	RequestedDate   *time.Time          `json:"requested_date" db:"requested_date"`
}

Reimbursement is money that is intended to be paid to the servicemember

func BuildDraftReimbursement

func BuildDraftReimbursement(requestedAmount unit.Cents, methodOfReceipt MethodOfReceipt) Reimbursement

BuildDraftReimbursement makes a Reimbursement in the DRAFT state, but does not save it

func BuildRequestedReimbursement

func BuildRequestedReimbursement(requestedAmount unit.Cents, methodOfReceipt MethodOfReceipt) Reimbursement

BuildRequestedReimbursement makes a Reimbursement in the REQUEST state, but does not save it This will be useful for reimbursements that are filed after the initial move is created

func FetchReimbursement

func FetchReimbursement(db *pop.Connection, _ *auth.Session, id uuid.UUID) (*Reimbursement, error)

FetchReimbursement Fetches and Validates a Reimbursement model

func (*Reimbursement) Approve

func (r *Reimbursement) Approve() error

Approve approves the Reimbursement

func (*Reimbursement) Pay

func (r *Reimbursement) Pay() error

Pay pays the Reimbursement

func (*Reimbursement) Reject

func (r *Reimbursement) Reject() error

Reject rejects the Reimbursement

func (*Reimbursement) Request

func (r *Reimbursement) Request() error

Request officially requests the reimbursement.

func (Reimbursement) TableName

func (r Reimbursement) TableName() string

TableName overrides the table name used by Pop.

func (*Reimbursement) Validate

func (r *Reimbursement) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReimbursementStatus

type ReimbursementStatus string

ReimbursementStatus is the status of the Reimbursement

const (
	// ReimbursementStatusDRAFT captures enum value "DRAFT"
	ReimbursementStatusDRAFT ReimbursementStatus = "DRAFT"
	// ReimbursementStatusREQUESTED captures enum value "REQUESTED"
	ReimbursementStatusREQUESTED ReimbursementStatus = "REQUESTED"
	// ReimbursementStatusAPPROVED captures enum value "APPROVED"
	ReimbursementStatusAPPROVED ReimbursementStatus = "APPROVED"
	// ReimbursementStatusREJECTED captures enum value "REJECTED"
	ReimbursementStatusREJECTED ReimbursementStatus = "REJECTED"
	// ReimbursementStatusPAID captures enum value "PAID"
	ReimbursementStatusPAID ReimbursementStatus = "PAID"
)

type Reimbursements

type Reimbursements []Reimbursement

type ReportViolation

type ReportViolation struct {
	ID          uuid.UUID        `json:"id" db:"id"`
	ReportID    uuid.UUID        `json:"report_id" db:"report_id"`
	Report      EvaluationReport `belongs_to:"evaluation_report" fk_id:"report_id"`
	Violation   PWSViolation     `belongs_to:"pws_violations" fk_id:"violation_id"`
	ViolationID uuid.UUID        `json:"violation_id" db:"violation_id"`
}

func (ReportViolation) TableName

func (r ReportViolation) TableName() string

TableName overrides the table name used by Pop.

func (*ReportViolation) Validate

func (r *ReportViolation) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ReportViolations

type ReportViolations []ReportViolation

type Reweigh

type Reweigh struct {
	ID                     uuid.UUID        `db:"id"`
	RequestedAt            time.Time        `db:"requested_at"`
	RequestedBy            ReweighRequester `db:"requested_by"`
	Shipment               MTOShipment      `belongs_to:"mto_shipments" fk_id:"shipment_id"`
	ShipmentID             uuid.UUID        `db:"shipment_id"`
	VerificationProvidedAt *time.Time       `db:"verification_provided_at"`
	VerificationReason     *string          `db:"verification_reason"`
	Weight                 *unit.Pound      `db:"weight"`
	CreatedAt              time.Time        `db:"created_at"`
	UpdatedAt              time.Time        `db:"updated_at"`
}

Reweigh represents a request for the prime mover to reweigh a shipment or provide verification why they could not

func (Reweigh) TableName

func (r Reweigh) TableName() string

TableName overrides the table name used by Pop.

func (*Reweigh) Validate

func (r *Reweigh) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate ensures the reweigh fields have the required and optional valid values prior to saving

type ReweighRequester

type ReweighRequester string

ReweighRequester is the actor who initiated the reweigh request for the shipment

const (
	// ReweighRequesterCustomer represents the customer requesting a reweigh
	ReweighRequesterCustomer ReweighRequester = "CUSTOMER"
	// ReweighRequesterPrime represents the prime mover requesting a reweigh
	ReweighRequesterPrime ReweighRequester = "PRIME"
	// ReweighRequesterSystem represents the milmove system triggering a reweigh
	ReweighRequesterSystem ReweighRequester = "SYSTEM"
	// ReweighRequesterTOO represents the TOO office user requesting a reweigh
	ReweighRequesterTOO ReweighRequester = "TOO"
)

type RoleInclusion

type RoleInclusion struct {
	Name    string
	Field   AdminRole
	List    []AdminRole
	Message string
}

RoleInclusion is used to validate if a role is valid for inclusion

func (*RoleInclusion) IsValid

func (v *RoleInclusion) IsValid(errors *validate.Errors)

IsValid validates if RoleInclusion is valid

type SITDurationUpdate

type SITDurationUpdate struct {
	ID                uuid.UUID                      `db:"id"`
	MTOShipment       MTOShipment                    `belongs_to:"mto_shipments" fk_id:"mto_shipment_id"`
	MTOShipmentID     uuid.UUID                      `db:"mto_shipment_id"`
	RequestReason     SITDurationUpdateRequestReason `db:"request_reason"`
	ContractorRemarks *string                        `db:"contractor_remarks"`
	RequestedDays     int                            `db:"requested_days"`
	Status            SITDurationUpdateStatus        `db:"status"`
	ApprovedDays      *int                           `db:"approved_days"`
	DecisionDate      *time.Time                     `db:"decision_date"`
	OfficeRemarks     *string                        `db:"office_remarks"`
	CustomerExpense   *bool                          `db:"customer_expense"`
	CreatedAt         time.Time                      `db:"created_at"`
	UpdatedAt         time.Time                      `db:"updated_at"`
}

SITDurationUpdate struct representing one SIT duration update Formerly known as "SITExtension"

func (SITDurationUpdate) TableName

func (m SITDurationUpdate) TableName() string

TableName overrides the table name used by Pop.

func (*SITDurationUpdate) Validate

func (m *SITDurationUpdate) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type SITDurationUpdateRequestReason

type SITDurationUpdateRequestReason string

SITDurationUpdateRequestReason type for SIT Duration Update Request Reason

const (
	// SITExtensionRequestReasonSeriousIllnessMember is the sit extension request reason type for SIT extensions
	SITExtensionRequestReasonSeriousIllnessMember SITDurationUpdateRequestReason = "SERIOUS_ILLNESS_MEMBER"
	// SITExtensionRequestReasonSeriousIllnessDependent is the sit extension request reason type for SIT extensions
	SITExtensionRequestReasonSeriousIllnessDependent SITDurationUpdateRequestReason = "SERIOUS_ILLNESS_DEPENDENT"
	// SITExtensionRequestReasonImpendingAssignment is the sit extension request reason type for SIT extensions
	SITExtensionRequestReasonImpendingAssignment SITDurationUpdateRequestReason = "IMPENDING_ASSIGNEMENT"
	// SITExtensionRequestReasonDirectedTemporaryDuty is the sit extension request reason type for SIT extensions
	SITExtensionRequestReasonDirectedTemporaryDuty SITDurationUpdateRequestReason = "DIRECTED_TEMPORARY_DUTY"
	// SITExtensionRequestReasonNonavailabilityOfCivilianHousing is the sit extension request reason type for SIT extensions
	SITExtensionRequestReasonNonavailabilityOfCivilianHousing SITDurationUpdateRequestReason = "NONAVAILABILITY_OF_CIVILIAN_HOUSING"
	// SITExtensionRequestReasonAwaitingCompletionOfResidence is the sit extension request reason type for SIT extensions
	SITExtensionRequestReasonAwaitingCompletionOfResidence SITDurationUpdateRequestReason = "AWAITING_COMPLETION_OF_RESIDENCE"
	// SITExtensionRequestReasonOther is the sit extension request reason type for SIT extensions
	SITExtensionRequestReasonOther SITDurationUpdateRequestReason = "OTHER"
)

type SITDurationUpdateStatus

type SITDurationUpdateStatus string

SITDurationUpdateStatus type for SIT Duration Update request status

const (
	// SITExtensionStatusPending is a SIT extension status
	SITExtensionStatusPending SITDurationUpdateStatus = "PENDING"
	// SITExtensionStatusApproved is a SIT extension status
	SITExtensionStatusApproved SITDurationUpdateStatus = "APPROVED"
	// SITExtensionStatusDenied is a SIT extension status
	SITExtensionStatusDenied SITDurationUpdateStatus = "DENIED"
)

type SITDurationUpdates

type SITDurationUpdates []SITDurationUpdate

SITDurationUpdates is a slice containing SITDurationUpdate Formerly known as "SITExtensions"

type SITEntryDateUpdate

type SITEntryDateUpdate struct {
	ID           uuid.UUID  `db:"id"`
	SITEntryDate *time.Time `db:"sit_entry_date"`
}

type SITLocationType

type SITLocationType string

SITLocationType represents whether the SIT at the origin or destination

const (
	// SITLocationTypeOrigin captures enum value "ORIGIN"
	SITLocationTypeOrigin SITLocationType = "ORIGIN"
	// SITLocationTypeDestination captures enum value "DESTINATION"
	SITLocationTypeDestination SITLocationType = "DESTINATION"
)

type SITServiceItemGrouping

type SITServiceItemGrouping struct {
	Summary      SITSummary
	ServiceItems []MTOServiceItem
}

Holds the relevant SIT ReServiceCodes for Domestic Origin and Destination SIT service items, and provides a top-level summary due to our Service Item architecture

type SITServiceItemGroupings

type SITServiceItemGroupings []SITServiceItemGrouping

Hold groupings of SIT for the shipment

type SITSummary

type SITSummary struct {
	FirstDaySITServiceItemID uuid.UUID // TODO: Refactor this out and instead base payments off the entire grouping rather than just DOFSIT/DOASIT
	Location                 string
	DaysInSIT                int
	SITEntryDate             time.Time
	SITDepartureDate         *time.Time
	SITAuthorizedEndDate     time.Time
	SITCustomerContacted     *time.Time
	SITRequestedDelivery     *time.Time
}

Holds the summary of "Sub-Groupings" of SIT. For example, this will list the overall summary for an array of DOFSIT, DOPSIT, DOASIT, etc., and the same for destination

type SSWMaxWeightEntitlement

type SSWMaxWeightEntitlement struct {
	Entitlement   unit.Pound
	ProGear       unit.Pound
	SpouseProGear unit.Pound
	TotalWeight   unit.Pound
}

SSWMaxWeightEntitlement weight allotment for the shipment summary worksheet.

type ServiceItemParamKey

type ServiceItemParamKey struct {
	ID          uuid.UUID              `json:"id" db:"id"`
	Key         ServiceItemParamName   `json:"key" db:"key"`
	Description string                 `json:"description" db:"description"`
	Type        ServiceItemParamType   `json:"type" db:"type"`
	Origin      ServiceItemParamOrigin `json:"origin" db:"origin"`
	CreatedAt   time.Time              `db:"created_at"`
	UpdatedAt   time.Time              `db:"updated_at"`
}

ServiceItemParamKey is a key for a Service Item Param

func (ServiceItemParamKey) TableName

func (s ServiceItemParamKey) TableName() string

TableName overrides the table name used by Pop.

func (*ServiceItemParamKey) Validate

func (s *ServiceItemParamKey) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate validates a ServiceItemParamKey

type ServiceItemParamKeys

type ServiceItemParamKeys []ServiceItemParamKey

type ServiceItemParamName

type ServiceItemParamName string

ServiceItemParamName is the name of service item parameter

const (
	// ServiceItemParamNameActualPickupDate is the param key name ActualPickupDate
	ServiceItemParamNameActualPickupDate ServiceItemParamName = "ActualPickupDate"
	// ServiceItemParamNameContractCode is the param key name ContractCode
	ServiceItemParamNameContractCode ServiceItemParamName = "ContractCode"
	// ServiceItemParamNameContractYearName is the param key name ContractYearName
	ServiceItemParamNameContractYearName ServiceItemParamName = "ContractYearName"
	// ServiceItemParamNameCubicFeetBilled is the param key name CubicFeetBilled
	ServiceItemParamNameCubicFeetBilled ServiceItemParamName = "CubicFeetBilled"
	// ServiceItemParamNameCubicFeetCrating is the param key name CubicFeetCrating
	ServiceItemParamNameCubicFeetCrating ServiceItemParamName = "CubicFeetCrating"
	// ServiceItemParamNameDimensionHeight is the param key name DimensionHeight
	ServiceItemParamNameDimensionHeight ServiceItemParamName = "DimensionHeight"
	// ServiceItemParamNameDimensionLength is the param key name DimensionLength
	ServiceItemParamNameDimensionLength ServiceItemParamName = "DimensionLength"
	// ServiceItemParamNameDimensionWidth is the param key name DimensionWidth
	ServiceItemParamNameDimensionWidth ServiceItemParamName = "DimensionWidth"
	// ServiceItemParamNameDistanceZip is the param key name DistanceZip
	ServiceItemParamNameDistanceZip ServiceItemParamName = "DistanceZip"
	// ServiceItemParamNameDistanceZipSITDest is the param key name DistanceZipSITDest
	ServiceItemParamNameDistanceZipSITDest ServiceItemParamName = "DistanceZipSITDest"
	// ServiceItemParamNameDistanceZipSITOrigin is the param key name DistanceZipSITOrigin
	ServiceItemParamNameDistanceZipSITOrigin ServiceItemParamName = "DistanceZipSITOrigin"
	// ServiceItemParamNameEIAFuelPrice is the param key name EIAFuelPrice
	ServiceItemParamNameEIAFuelPrice ServiceItemParamName = "EIAFuelPrice"
	// ServiceItemParamNameEscalationCompounded is the param key name EscalationCompounded
	ServiceItemParamNameEscalationCompounded ServiceItemParamName = "EscalationCompounded"
	// ServiceItemParamNameFSCMultiplier is the param key name FSCMultiplier
	ServiceItemParamNameFSCMultiplier ServiceItemParamName = "FSCMultiplier"
	// ServiceItemParamNameFSCPriceDifferenceInCents is the param key name FSCPriceDifferenceInCents
	ServiceItemParamNameFSCPriceDifferenceInCents ServiceItemParamName = "FSCPriceDifferenceInCents"
	// ServiceItemParamNameFSCWeightBasedDistanceMultiplier is the param key name FSCWeightBasedDistanceMultiplier
	ServiceItemParamNameFSCWeightBasedDistanceMultiplier ServiceItemParamName = "FSCWeightBasedDistanceMultiplier"
	// ServiceItemParamNameIsPeak is the param key name IsPeak
	ServiceItemParamNameIsPeak ServiceItemParamName = "IsPeak"
	// ServiceItemParamNameMarketDest is the param key name MarketDest
	ServiceItemParamNameMarketDest ServiceItemParamName = "MarketDest"
	// ServiceItemParamNameMarketOrigin is the param key name MarketOrigin
	ServiceItemParamNameMarketOrigin ServiceItemParamName = "MarketOrigin"
	// ServiceItemParamNameMTOAvailableToPrimeAt is the param key name MTOAvailableToPrimeAt
	ServiceItemParamNameMTOAvailableToPrimeAt ServiceItemParamName = "MTOAvailableToPrimeAt"
	// ServiceItemParamNameNTSPackingFactor is the param key name NTSPackingFactor
	ServiceItemParamNameNTSPackingFactor ServiceItemParamName = "NTSPackingFactor"
	// ServiceItemParamNameNumberDaysSIT is the param key name NumberDaysSIT
	ServiceItemParamNameNumberDaysSIT ServiceItemParamName = "NumberDaysSIT"
	// ServiceItemParamNamePriceAreaDest is the param key name PriceAreaDest
	ServiceItemParamNamePriceAreaDest ServiceItemParamName = "PriceAreaDest"
	// ServiceItemParamNamePriceAreaIntlDest is the param key name PriceAreaIntlDest
	ServiceItemParamNamePriceAreaIntlDest ServiceItemParamName = "PriceAreaIntlDest"
	// ServiceItemParamNamePriceAreaIntlOrigin is the param key name PriceAreaIntlOrigin
	ServiceItemParamNamePriceAreaIntlOrigin ServiceItemParamName = "PriceAreaIntlOrigin"
	// ServiceItemParamNamePriceAreaOrigin is the param key name PriceAreaOrigin
	ServiceItemParamNamePriceAreaOrigin ServiceItemParamName = "PriceAreaOrigin"
	// ServiceItemParamNamePriceRateOrFactor is the param key name PriceRateOrFactor
	ServiceItemParamNamePriceRateOrFactor ServiceItemParamName = "PriceRateOrFactor"
	// ServiceItemParamNamePSILinehaulDom is the param key name PSI_LinehaulDom
	ServiceItemParamNamePSILinehaulDom ServiceItemParamName = "PSI_LinehaulDom"
	// ServiceItemParamNamePSILinehaulDomPrice is the param key name PSI_LinehaulDomPrice
	ServiceItemParamNamePSILinehaulDomPrice ServiceItemParamName = "PSI_LinehaulDomPrice"
	// ServiceItemParamNamePSILinehaulShort is the param key name PSI_LinehaulShort
	ServiceItemParamNamePSILinehaulShort ServiceItemParamName = "PSI_LinehaulShort"
	// ServiceItemParamNamePSILinehaulShortPrice is the param key name PSI_LinehaulShortPrice
	ServiceItemParamNamePSILinehaulShortPrice ServiceItemParamName = "PSI_LinehaulShortPrice"
	// ServiceItemParamNamePSIPriceDomDest is the param key name PSI_PriceDomDest
	ServiceItemParamNamePSIPriceDomDest ServiceItemParamName = "PSI_PriceDomDest"
	// ServiceItemParamNamePSIPriceDomDestPrice is the param key name PSI_PriceDomDestPrice
	ServiceItemParamNamePSIPriceDomDestPrice ServiceItemParamName = "PSI_PriceDomDestPrice"
	// ServiceItemParamNamePSIPriceDomOrigin is the param key name PSI_PriceDomOrigin
	ServiceItemParamNamePSIPriceDomOrigin ServiceItemParamName = "PSI_PriceDomOrigin"
	// ServiceItemParamNamePSIPriceDomOriginPrice is the param key name PSI_PriceDomOriginPrice
	ServiceItemParamNamePSIPriceDomOriginPrice ServiceItemParamName = "PSI_PriceDomOriginPrice"
	// ServiceItemParamNamePSIShippingLinehaulIntlCO is the param key name PSI_ShippingLinehaulIntlCO
	ServiceItemParamNamePSIShippingLinehaulIntlCO ServiceItemParamName = "PSI_ShippingLinehaulIntlCO"
	// ServiceItemParamNamePSIShippingLinehaulIntlCOPrice is the param key name PSI_ShippingLinehaulIntlCOPrice
	ServiceItemParamNamePSIShippingLinehaulIntlCOPrice ServiceItemParamName = "PSI_ShippingLinehaulIntlCOPrice"
	// ServiceItemParamNamePSIShippingLinehaulIntlOC is the param key name PSI_ShippingLinehaulIntlOC
	ServiceItemParamNamePSIShippingLinehaulIntlOC ServiceItemParamName = "PSI_ShippingLinehaulIntlOC"
	// ServiceItemParamNamePSIShippingLinehaulIntlOCPrice is the param key name PSI_ShippingLinehaulIntlOCPrice
	ServiceItemParamNamePSIShippingLinehaulIntlOCPrice ServiceItemParamName = "PSI_ShippingLinehaulIntlOCPrice"
	// ServiceItemParamNamePSIShippingLinehaulIntlOO is the param key name PSI_ShippingLinehaulIntlOO
	ServiceItemParamNamePSIShippingLinehaulIntlOO ServiceItemParamName = "PSI_ShippingLinehaulIntlOO"
	// ServiceItemParamNamePSIShippingLinehaulIntlOOPrice is the param key name PSI_ShippingLinehaulIntlOOPrice
	ServiceItemParamNamePSIShippingLinehaulIntlOOPrice ServiceItemParamName = "PSI_ShippingLinehaulIntlOOPrice"
	// ServiceItemParamNameRateAreaNonStdDest is the param key name RateAreaNonStdDest
	ServiceItemParamNameRateAreaNonStdDest ServiceItemParamName = "RateAreaNonStdDest"
	// ServiceItemParamNameRateAreaNonStdOrigin is the param key name RateAreaNonStdOrigin
	ServiceItemParamNameRateAreaNonStdOrigin ServiceItemParamName = "RateAreaNonStdOrigin"
	// ServiceItemParamNameReferenceDate is the param key name ReferenceDate
	ServiceItemParamNameReferenceDate ServiceItemParamName = "ReferenceDate"
	// ServiceItemParamNameRequestedPickupDate is the param key name RequestedPickupDate
	ServiceItemParamNameRequestedPickupDate ServiceItemParamName = "RequestedPickupDate"
	// ServiceItemParamNameServiceAreaDest is the param key name ServiceAreaDest
	ServiceItemParamNameServiceAreaDest ServiceItemParamName = "ServiceAreaDest"
	// ServiceItemParamNameServiceAreaOrigin is the param key name ServiceAreaOrigin
	ServiceItemParamNameServiceAreaOrigin ServiceItemParamName = "ServiceAreaOrigin"
	// ServiceItemParamNameServicesScheduleDest is the param key name ServicesScheduleDest
	ServiceItemParamNameServicesScheduleDest ServiceItemParamName = "ServicesScheduleDest"
	// ServiceItemParamNameServicesScheduleOrigin is the param key name ServicesScheduleOrigin
	ServiceItemParamNameServicesScheduleOrigin ServiceItemParamName = "ServicesScheduleOrigin"
	// ServiceItemParamNameSITPaymentRequestEnd is the param key name SITPaymentRequestEnd
	ServiceItemParamNameSITPaymentRequestEnd ServiceItemParamName = "SITPaymentRequestEnd"
	// ServiceItemParamNameSITPaymentRequestStart is the param key name SITPaymentRequestStart
	ServiceItemParamNameSITPaymentRequestStart ServiceItemParamName = "SITPaymentRequestStart"
	// ServiceItemParamNameSITScheduleDest is the param key name SITScheduleDest
	ServiceItemParamNameSITScheduleDest ServiceItemParamName = "SITScheduleDest"
	// ServiceItemParamNameSITServiceAreaDest is the param key name SITServiceAreaDest
	ServiceItemParamNameSITServiceAreaDest ServiceItemParamName = "SITServiceAreaDest"
	// ServiceItemParamNameSITScheduleOrigin is the param key name SITScheduleOrigin
	ServiceItemParamNameSITScheduleOrigin ServiceItemParamName = "SITScheduleOrigin"
	// ServiceItemParamNameSITServiceAreaOrigin is the param key name ServiceAreaOriginSIT
	ServiceItemParamNameSITServiceAreaOrigin ServiceItemParamName = "SITServiceAreaOrigin"
	// ServiceItemParamNameWeightAdjusted is the param key name WeightAdjusted
	ServiceItemParamNameWeightAdjusted ServiceItemParamName = "WeightAdjusted"
	// ServiceItemParamNameWeightBilled is the param key name WeightBilled
	ServiceItemParamNameWeightBilled ServiceItemParamName = "WeightBilled"
	// ServiceItemParamNameWeightEstimated is the param key name WeightEstimated
	ServiceItemParamNameWeightEstimated ServiceItemParamName = "WeightEstimated"
	// ServiceItemParamNameWeightOriginal is the param key name WeightOriginal
	ServiceItemParamNameWeightOriginal ServiceItemParamName = "WeightOriginal"
	// ServiceItemParamNameWeightReweigh is the param key name WeightReweigh
	ServiceItemParamNameWeightReweigh ServiceItemParamName = "WeightReweigh"
	// ServiceItemParamNameZipDestAddress is the param key name ZipDestAddress
	ServiceItemParamNameZipDestAddress ServiceItemParamName = "ZipDestAddress"
	// ServiceItemParamNameZipPickupAddress is the param key name ZipPickupAddress
	ServiceItemParamNameZipPickupAddress ServiceItemParamName = "ZipPickupAddress"
	// ServiceItemParamNameZipSITDestHHGFinalAddress is the param key name ZipSITDestHHGFinalAddress
	ServiceItemParamNameZipSITDestHHGFinalAddress ServiceItemParamName = "ZipSITDestHHGFinalAddress"
	// ServiceItemParamNameZipSITDestHHGOriginalAddress is the param key name ZipSITDestHHGOriginalAddress
	ServiceItemParamNameZipSITDestHHGOriginalAddress ServiceItemParamName = "ZipSITDestHHGOriginalAddress"
	// ServiceItemParamNameZipSITOriginHHGActualAddress is the param key name ZipSITOriginHHGActualAddress
	ServiceItemParamNameZipSITOriginHHGActualAddress ServiceItemParamName = "ZipSITOriginHHGActualAddress"
	// ServiceItemParamNameZipSITOriginHHGOriginalAddress is the param key name ZipSITOriginHHGOriginalAddress
	ServiceItemParamNameZipSITOriginHHGOriginalAddress ServiceItemParamName = "ZipSITOriginHHGOriginalAddress"
	// ServiceItemParamNameStandaloneCrate is the param key name StandaloneCrate
	ServiceItemParamNameStandaloneCrate ServiceItemParamName = "StandaloneCrate"
	// ServiceItemParamNameStandaloneCrateCap is the param key name StandaloneCrateCap
	ServiceItemParamNameStandaloneCrateCap ServiceItemParamName = "StandaloneCrateCap"
	// ServiceItemParamNameUncappedRequestTotal is the param key name UncappedRequestTotal
	ServiceItemParamNameUncappedRequestTotal ServiceItemParamName = "UncappedRequestTotal"
)

func (ServiceItemParamName) String

func (s ServiceItemParamName) String() string

type ServiceItemParamOrigin

type ServiceItemParamOrigin string

ServiceItemParamOrigin is a type of service item parameter origin

const (
	// ServiceItemParamOriginPrime is the Prime origin
	ServiceItemParamOriginPrime ServiceItemParamOrigin = "PRIME"
	// ServiceItemParamOriginSystem is the System origin
	ServiceItemParamOriginSystem ServiceItemParamOrigin = "SYSTEM"
	// ServiceItemParamOriginPricer is the Pricer origin
	ServiceItemParamOriginPricer ServiceItemParamOrigin = "PRICER"
	// ServiceItemParamOriginPaymentRequest is the PaymentRequest origin
	ServiceItemParamOriginPaymentRequest ServiceItemParamOrigin = "PAYMENT_REQUEST"
)

func (ServiceItemParamOrigin) String

func (s ServiceItemParamOrigin) String() string

String is a string representation of a ServiceItemParamOrigin

type ServiceItemParamType

type ServiceItemParamType string

ServiceItemParamType is a type of service item parameter

const (
	// ServiceItemParamTypeString is a string
	ServiceItemParamTypeString ServiceItemParamType = "STRING"
	// ServiceItemParamTypeDate is a date
	ServiceItemParamTypeDate ServiceItemParamType = "DATE"
	// ServiceItemParamTypeInteger is an integer
	ServiceItemParamTypeInteger ServiceItemParamType = "INTEGER"
	// ServiceItemParamTypeDecimal is a decimal
	ServiceItemParamTypeDecimal ServiceItemParamType = "DECIMAL"
	// ServiceItemParamTypeTimestamp is a timestamp
	ServiceItemParamTypeTimestamp ServiceItemParamType = "TIMESTAMP"
	// ServiceItemParamTypePaymentServiceItemUUID is a UUID
	ServiceItemParamTypePaymentServiceItemUUID ServiceItemParamType = "PaymentServiceItemUUID"
	// ServiceItemParamTypeBoolean is a boolean
	ServiceItemParamTypeBoolean ServiceItemParamType = "BOOLEAN"
)

func (ServiceItemParamType) String

func (s ServiceItemParamType) String() string

String is a string representation of a ServiceItemParamType

type ServiceItemsCustomerContacts

type ServiceItemsCustomerContacts struct {
	ID uuid.UUID `db:"id"`
	// For many-to-many relationships, Pop will query for an id field on the join table based off of the names of the originating models.
	// since MTOServiceItem and MTOServiceItemCustomerContact have four capital letters in front,
	// Pop will not put an underscore between the "mto" and "service" in both ids. The columns on this table must exclude that underscore.
	// This is why the db and fk_id flags are different.
	MTOServiceItemID                uuid.UUID                     `db:"mtoservice_item_id" fk_id:"mto_service_item_id"`
	MTOServiceItem                  MTOServiceItem                `belongs_to:"mto_service_items" db:"-"`
	MTOServiceItemCustomerContactID uuid.UUID                     `db:"mtoservice_item_customer_contact_id" fk_id:"mto_service_item_customer_contact_id"`
	MTOServiceItemCustomerContact   MTOServiceItemCustomerContact `belongs_to:"mto_service_items_customer_contacts" db:"-"`
	CreatedAt                       time.Time                     `db:"created_at"`
	UpdateAt                        time.Time                     `db:"updated_at"`
	DeletedAt                       *time.Time                    `db:"deleted_at"`
}

ServiceItemsCustomerContacts represents a relationship between a MTOServiceItem and a MTOServiceItemCustomerContact.

func (ServiceItemsCustomerContacts) TableName

func (s ServiceItemsCustomerContacts) TableName() string

TableName overrides the table name used by Pop.

type ServiceMember

type ServiceMember struct {
	ID                     uuid.UUID                 `json:"id" db:"id"`
	CreatedAt              time.Time                 `json:"created_at" db:"created_at"`
	UpdatedAt              time.Time                 `json:"updated_at" db:"updated_at"`
	UserID                 uuid.UUID                 `json:"user_id" db:"user_id"`
	User                   User                      `belongs_to:"user" fk_id:"user_id"`
	Edipi                  *string                   `json:"edipi" db:"edipi"`
	Emplid                 *string                   `json:"emplid" db:"emplid"`
	Affiliation            *ServiceMemberAffiliation `json:"affiliation" db:"affiliation"`
	FirstName              *string                   `json:"first_name" db:"first_name"`
	MiddleName             *string                   `json:"middle_name" db:"middle_name"`
	LastName               *string                   `json:"last_name" db:"last_name"`
	Suffix                 *string                   `json:"suffix" db:"suffix"`
	Telephone              *string                   `json:"telephone" db:"telephone"`
	SecondaryTelephone     *string                   `json:"secondary_telephone" db:"secondary_telephone"`
	PersonalEmail          *string                   `json:"personal_email" db:"personal_email"`
	PhoneIsPreferred       *bool                     `json:"phone_is_preferred" db:"phone_is_preferred"`
	EmailIsPreferred       *bool                     `json:"email_is_preferred" db:"email_is_preferred"`
	ResidentialAddressID   *uuid.UUID                `json:"residential_address_id" db:"residential_address_id"`
	ResidentialAddress     *Address                  `belongs_to:"address" fk_id:"residential_address_id"`
	BackupMailingAddressID *uuid.UUID                `json:"backup_mailing_address_id" db:"backup_mailing_address_id"`
	BackupMailingAddress   *Address                  `belongs_to:"address" fk_id:"backup_mailing_address_id"`
	Orders                 Orders                    `has_many:"orders" fk_id:"service_member_id" order_by:"created_at desc" `
	BackupContacts         BackupContacts            `has_many:"backup_contacts" fk_id:"service_member_id"`
	CacValidated           bool                      `json:"cac_validated" db:"cac_validated"`
}

ServiceMember is a user of type service member

func FetchServiceMember

func FetchServiceMember(db *pop.Connection, id uuid.UUID) (ServiceMember, error)

FetchServiceMember returns a service member by id REGARDLESS OF USER. Does not fetch nested models. DO NOT USE IF YOU NEED USER AUTH

func FetchServiceMemberForUser

func FetchServiceMemberForUser(db *pop.Connection, session *auth.Session, id uuid.UUID) (ServiceMember, error)

FetchServiceMemberForUser returns a service member only if it is allowed for the given user to access that service member. This method is thereby a useful way of performing access control checks.

func GetCustomerFromShipment

func GetCustomerFromShipment(db *pop.Connection, shipmentID uuid.UUID) (*ServiceMember, error)

GetCustomerFromShipment gets the service member given a shipment id

func (ServiceMember) CreateBackupContact

func (s ServiceMember) CreateBackupContact(db *pop.Connection, name string, email string, phone *string, permission BackupContactPermission) (BackupContact, *validate.Errors, error)

CreateBackupContact creates a backup contact model tied to the service member

func (ServiceMember) CreateOrder

func (s ServiceMember) CreateOrder(appCtx appcontext.AppContext,
	issueDate time.Time,
	reportByDate time.Time,
	ordersType internalmessages.OrdersType,
	hasDependents bool,
	spouseHasProGear bool,
	newDutyLocation DutyLocation,
	ordersNumber *string,
	tac *string,
	sac *string,
	departmentIndicator *string,
	originDutyLocation *DutyLocation,
	grade *internalmessages.OrderPayGrade,
	entitlement *Entitlement,
	originDutyLocationGBLOC *string,
	packingAndShippingInstructions string,
	newDutyLocationGBLOC *string) (Order, *validate.Errors, error)

CreateOrder creates an order model tied to the service member

func (*ServiceMember) IsProfileComplete

func (s *ServiceMember) IsProfileComplete() bool

IsProfileComplete checks if the profile has been completely filled out

func (*ServiceMember) ReverseNameLineFormat

func (s *ServiceMember) ReverseNameLineFormat() string

ReverseNameLineFormat returns the service member's name as a string in Last, First, M format.

func (ServiceMember) TableName

func (s ServiceMember) TableName() string

TableName overrides the table name used by Pop.

func (ServiceMember) ToSearchResult

func (s ServiceMember) ToSearchResult() ServiceMemberSearchResult

Convenience function to convert to search result type, used in go tests

func (*ServiceMember) Validate

func (s *ServiceMember) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ServiceMemberAffiliation

type ServiceMemberAffiliation string

ServiceMemberAffiliation represents a service member's branch

const (
	// AffiliationARMY captures enum value "ARMY"
	AffiliationARMY ServiceMemberAffiliation = "ARMY"
	// AffiliationNAVY captures enum value "NAVY"
	AffiliationNAVY ServiceMemberAffiliation = "NAVY"
	// AffiliationMARINES captures enum value "MARINES"
	AffiliationMARINES ServiceMemberAffiliation = "MARINES"
	// AffiliationAIRFORCE captures enum value "AIR_FORCE"
	AffiliationAIRFORCE ServiceMemberAffiliation = "AIR_FORCE"
	// AffiliationCOASTGUARD captures enum value "COAST_GUARD"
	AffiliationCOASTGUARD ServiceMemberAffiliation = "COAST_GUARD"
	// AffiliationCOASTGUARD captures enum value "SPACE_FORCE"
	AffiliationSPACEFORCE ServiceMemberAffiliation = "SPACE_FORCE"
)

func (ServiceMemberAffiliation) String

func (s ServiceMemberAffiliation) String() string

String is a string representation of a ServiceMemberAffiliation

type ServiceMemberSearchResult

type ServiceMemberSearchResult struct {
	ID                     uuid.UUID                 `json:"id" db:"id"`
	CreatedAt              time.Time                 `json:"created_at" db:"created_at"`
	UpdatedAt              time.Time                 `json:"updated_at" db:"updated_at"`
	UserID                 uuid.UUID                 `json:"user_id" db:"user_id"`
	User                   User                      `belongs_to:"user" fk_id:"user_id"`
	Edipi                  *string                   `json:"edipi" db:"edipi"`
	Emplid                 *string                   `json:"emplid" db:"emplid"`
	Affiliation            *ServiceMemberAffiliation `json:"affiliation" db:"affiliation"`
	FirstName              *string                   `json:"first_name" db:"first_name"`
	MiddleName             *string                   `json:"middle_name" db:"middle_name"`
	LastName               *string                   `json:"last_name" db:"last_name"`
	Suffix                 *string                   `json:"suffix" db:"suffix"`
	Telephone              *string                   `json:"telephone" db:"telephone"`
	SecondaryTelephone     *string                   `json:"secondary_telephone" db:"secondary_telephone"`
	PersonalEmail          *string                   `json:"personal_email" db:"personal_email"`
	PhoneIsPreferred       *bool                     `json:"phone_is_preferred" db:"phone_is_preferred"`
	EmailIsPreferred       *bool                     `json:"email_is_preferred" db:"email_is_preferred"`
	ResidentialAddressID   *uuid.UUID                `json:"residential_address_id" db:"residential_address_id"`
	ResidentialAddress     *Address                  `belongs_to:"address" fk_id:"residential_address_id"`
	BackupMailingAddressID *uuid.UUID                `json:"backup_mailing_address_id" db:"backup_mailing_address_id"`
	BackupMailingAddress   *Address                  `belongs_to:"address" fk_id:"backup_mailing_address_id"`
	Orders                 Orders                    `has_many:"orders" fk_id:"service_member_id" order_by:"created_at desc" `
	BackupContacts         BackupContacts            `has_many:"backup_contacts" fk_id:"service_member_id"`
	CacValidated           bool                      `json:"cac_validated" db:"cac_validated"`
	TotalSim               *float32                  `db:"total_sim"`
}

This model should be used whenever the customer name search is used. Had to create new struct so that Pop is aware of the "total_sim" field used in search queries. Since this isn't an actual column, but one created by a subquery, couldn't add it to original ServiceMember struct without errors.

type ServiceMemberSearchResults

type ServiceMemberSearchResults []ServiceMemberSearchResult

type ServiceMembers

type ServiceMembers []ServiceMember

type ServiceParam

type ServiceParam struct {
	ID                    uuid.UUID `json:"id" db:"id"`
	ServiceID             uuid.UUID `json:"service_id" db:"service_id"`
	ServiceItemParamKeyID uuid.UUID `json:"service_item_param_key_id" db:"service_item_param_key_id"`
	IsOptional            bool      `json:"is_optional" db:"is_optional"`
	CreatedAt             time.Time `db:"created_at"`
	UpdatedAt             time.Time `db:"updated_at"`

	// Associations
	Service             ReService           `belongs_to:"re_service" fk_id:"service_id"`
	ServiceItemParamKey ServiceItemParamKey `belongs_to:"service_item_param_key" fk_id:"service_item_param_key_id"`
}

ServiceParam is a Service Parameter

func (ServiceParam) TableName

func (p ServiceParam) TableName() string

TableName overrides the table name used by Pop.

func (*ServiceParam) Validate

func (p *ServiceParam) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ServiceParams

type ServiceParams []ServiceParam

type ServiceRequestDocument

type ServiceRequestDocument struct {
	ID               uuid.UUID `json:"id" db:"id"`
	MTOServiceItemID uuid.UUID `json:"mto_service_item_id" db:"mto_service_item_id"`
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`

	//Associations
	MTOServiceItem                MTOServiceItem                `belongs_to:"mto_service_item" fk_id:"mto_service_item_id"`
	ServiceRequestDocumentUploads ServiceRequestDocumentUploads `has_many:"service_request_document_uploads" fk_id:"service_request_documents_id" order_by:"created_at asc"`
}

ServiceRequestDocument represents a document for a service item requst by the Prime

func (ServiceRequestDocument) TableName

func (s ServiceRequestDocument) TableName() string

TableName overrides the table name used by Pop.

func (*ServiceRequestDocument) Validate

func (s *ServiceRequestDocument) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ServiceRequestDocumentUpload

type ServiceRequestDocumentUpload struct {
	ID                       uuid.UUID              `db:"id"`
	ServiceRequestDocumentID uuid.UUID              `db:"service_request_documents_id"`
	ServiceRequestDocument   ServiceRequestDocument `belongs_to:"service_request_documents" fk_id:"service_request_documents_id"`
	ContractorID             uuid.UUID              `db:"contractor_id"`
	Contractor               Contractor             `belongs_to:"contractors" fk_id:"contractor_id"`
	UploadID                 uuid.UUID              `db:"upload_id"`
	Upload                   Upload                 `belongs_to:"uploads" fk_id:"upload_id"`
	CreatedAt                time.Time              `db:"created_at"`
	UpdatedAt                time.Time              `db:"updated_at"`
	DeletedAt                *time.Time             `db:"deleted_at"`
}

A ServiceRequestDocumentUpload represents an user uploaded file, such as an image or PDF.

func (ServiceRequestDocumentUpload) TableName

func (u ServiceRequestDocumentUpload) TableName() string

TableName overrides the table name used by Pop.

func (*ServiceRequestDocumentUpload) Validate

func (u *ServiceRequestDocumentUpload) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type ServiceRequestDocumentUploads

type ServiceRequestDocumentUploads []ServiceRequestDocumentUpload

type ServiceRequestDocuments

type ServiceRequestDocuments []ServiceRequestDocument

type ShipmentAddressUpdate

type ShipmentAddressUpdate struct {
	ID                uuid.UUID                   `json:"id" db:"id"`
	ContractorRemarks string                      `json:"contractor_remarks" db:"contractor_remarks"`
	OfficeRemarks     *string                     `json:"office_remarks" db:"office_remarks"`
	Status            ShipmentAddressUpdateStatus `json:"status" db:"status"`
	CreatedAt         time.Time                   `db:"created_at"`
	UpdatedAt         time.Time                   `db:"updated_at"`

	// Associations
	Shipment              MTOShipment `belongs_to:"mto_shipments" fk_id:"shipment_id"`
	ShipmentID            uuid.UUID   `db:"shipment_id"`
	OriginalAddress       Address     `belongs_to:"addresses" fk_id:"original_address_id"`
	OriginalAddressID     uuid.UUID   `db:"original_address_id"`
	NewAddress            Address     `belongs_to:"addresses" fk_id:"new_address_id"`
	NewAddressID          uuid.UUID   `db:"new_address_id"`
	SitOriginalAddressID  *uuid.UUID  `db:"sit_original_address_id"`
	SitOriginalAddress    *Address    `belongs_to:"addresses" fk_id:"sit_original_address_id"`
	OldSitDistanceBetween *int        `db:"old_sit_distance_between"`
	NewSitDistanceBetween *int        `db:"new_sit_distance_between"`
}

func (ShipmentAddressUpdate) TableName

func (s ShipmentAddressUpdate) TableName() string

TableName overrides the table name used by Pop.

func (*ShipmentAddressUpdate) Validate

func (s *ShipmentAddressUpdate) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This should contain validation that is for data integrity. Business validation should occur in service objects.

type ShipmentAddressUpdateStatus

type ShipmentAddressUpdateStatus string

ShipmentAddressUpdateStatus represents the possible statuses for a mto shipment

const (
	// ShipmentAddressUpdateStatusRequested is the requested status type for Shipment Address Update Items
	ShipmentAddressUpdateStatusRequested ShipmentAddressUpdateStatus = "REQUESTED"
	// ShipmentAddressUpdateStatusRejected is the rejected status type for Shipment Address Update Items
	ShipmentAddressUpdateStatusRejected ShipmentAddressUpdateStatus = "REJECTED"
	// ShipmentAddressUpdateStatusApproved is the approved status type for Shipment Address Update Items
	ShipmentAddressUpdateStatusApproved ShipmentAddressUpdateStatus = "APPROVED"
)

type ShipmentAddressUpdates

type ShipmentAddressUpdates []ShipmentAddressUpdate

ShipmentAddressUpdates is a slice containing of ShipmentAddressUpdates

type ShipmentSummaryFormData

type ShipmentSummaryFormData struct {
	AllShipments             []MTOShipment
	ServiceMember            ServiceMember
	Order                    Order
	Move                     Move
	CurrentDutyLocation      DutyLocation
	NewDutyLocation          DutyLocation
	WeightAllotment          SSWMaxWeightEntitlement
	PPMShipment              PPMShipment
	PPMShipments             PPMShipments
	PPMShipmentFinalWeight   unit.Pound
	W2Address                *Address
	PreparationDate          time.Time
	Obligations              Obligations
	MovingExpenses           MovingExpenses
	PPMRemainingEntitlement  float64
	SignedCertifications     []*SignedCertification
	MaxSITStorageEntitlement int
}

ShipmentSummaryFormData is a container for the various objects required for the a Shipment Summary Worksheet

type SignedCertification

type SignedCertification struct {
	ID                uuid.UUID                `json:"id" db:"id"`
	SubmittingUserID  uuid.UUID                `json:"submitting_user_id" db:"submitting_user_id"`
	MoveID            uuid.UUID                `json:"move_id" db:"move_id"`
	PpmID             *uuid.UUID               `json:"ppm_id" db:"ppm_id"`
	CertificationType *SignedCertificationType `json:"certification_type" db:"certification_type"`
	CreatedAt         time.Time                `json:"created_at" db:"created_at"`
	UpdatedAt         time.Time                `json:"updated_at" db:"updated_at"`
	CertificationText string                   `json:"certification_text" db:"certification_text"`
	Signature         string                   `json:"signature" db:"signature"`
	Date              time.Time                `json:"date" db:"date"`
}

SignedCertification represents users acceptance

func FetchSignedCertificationPPMByType

func FetchSignedCertificationPPMByType(db *pop.Connection, session *auth.Session, move_id uuid.UUID, ppm_id uuid.UUID, certificationType SignedCertificationType) ([]*SignedCertification, error)

func FetchSignedCertifications

func FetchSignedCertifications(db *pop.Connection, session *auth.Session, id uuid.UUID) ([]*SignedCertification, error)

FetchSignedCertifications Fetches and Validates a all signed certifications associated with a move

func FetchSignedCertificationsPPMPayment

func FetchSignedCertificationsPPMPayment(db *pop.Connection, session *auth.Session, id uuid.UUID) (*SignedCertification, error)

DEPRECATED - This can be removed when the PPM Shipment Summary Worksheet is updated to use the new PPM shipment table FetchSignedCertificationsPPMPayment Fetches and Validates a PPM Payment Signature

func (SignedCertification) TableName

func (s SignedCertification) TableName() string

TableName overrides the table name used by Pop.

func (*SignedCertification) Validate

func (s *SignedCertification) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This should contain validation that is for data integrity. Business validation should occur in service objects.

type SignedCertificationType

type SignedCertificationType string

SignedCertificationType represents the types of certificates

const (
	// SignedCertificationTypePPM captures enum value "PPM" - deprecated 10/2020
	SignedCertificationTypePPM SignedCertificationType = "PPM"

	// SignedCertificationTypePPMPAYMENT captures enum value "PPM_PAYMENT"
	SignedCertificationTypePPMPAYMENT SignedCertificationType = "PPM_PAYMENT"

	// SignedCertificationTypeHHG captures enum value "HHG" - deprecated 10/2020
	SignedCertificationTypeHHG SignedCertificationType = "HHG"

	// SignedCertificationTypeSHIPMENT captures enum value "SHIPMENT" for all shipment types from 10/2020
	SignedCertificationTypeSHIPMENT SignedCertificationType = "SHIPMENT"

	SignedCertificationTypePreCloseoutReviewedPPMPAYMENT SignedCertificationType = "PRE_CLOSEOUT_REVIEWED_PPM_PAYMENT"

	SignedCertificationTypeCloseoutReviewedPPMPAYMENT SignedCertificationType = "CLOSEOUT_REVIEWED_PPM_PAYMENT"
)

type SignedCertifications

type SignedCertifications []SignedCertification

type StageConusToOconusPrice

type StageConusToOconusPrice struct {
	OriginDomesticPriceAreaCode string `db:"origin_domestic_price_area_code" csv:"origin_domestic_price_area_code"`
	OriginDomesticPriceArea     string `db:"origin_domestic_price_area" csv:"origin_domestic_price_area"`
	DestinationIntlPriceAreaID  string `db:"destination_intl_price_area_id" csv:"destination_intl_price_area_id"`
	DestinationIntlPriceArea    string `db:"destination_intl_price_area" csv:"destination_intl_price_area"`
	Season                      string `db:"season" csv:"season"`
	HHGShippingLinehaulPrice    string `db:"hhg_shipping_linehaul_price" csv:"hhg_shipping_linehaul_price"`
	UBPrice                     string `db:"ub_price" csv:"ub_price"`
}

StageConusToOconusPrice is the stage CONUS To OCONUS price

func (StageConusToOconusPrice) TableName

func (s StageConusToOconusPrice) TableName() string

TableName overrides the table name used by Pop.

type StageCounselingServicesPrice

type StageCounselingServicesPrice struct {
	ContractYear      string `db:"contract_year" csv:"contract_year"`
	PricePerTaskOrder string `db:"price_per_task_order" csv:"price_per_task_order"`
}

StageCounselingServicesPrice is the stage counseling service price

func (StageCounselingServicesPrice) TableName

func (s StageCounselingServicesPrice) TableName() string

TableName overrides the table name used by Pop.

type StageDomesticInternationalAdditionalPrice

type StageDomesticInternationalAdditionalPrice struct {
	Market       string `db:"market" csv:"market"`
	ShipmentType string `db:"shipment_type" csv:"shipment_type"`
	Factor       string `db:"factor" csv:"factor"`
}

StageDomesticInternationalAdditionalPrice is the stage domestic international additional price

func (StageDomesticInternationalAdditionalPrice) TableName

TableName overrides the table name used by Pop.

type StageDomesticLinehaulPrice

type StageDomesticLinehaulPrice struct {
	ServiceAreaNumber string `db:"service_area_number" csv:"service_area_number"`
	OriginServiceArea string `db:"origin_service_area" csv:"origin_service_area"`
	ServicesSchedule  string `db:"services_schedule" csv:"services_schedule"`
	Season            string `db:"season" csv:"season"`
	WeightLower       string `db:"weight_lower" csv:"weight_lower"`
	WeightUpper       string `db:"weight_upper" csv:"weight_upper"`
	MilesLower        string `db:"miles_lower" csv:"miles_lower"`
	MilesUpper        string `db:"miles_upper" csv:"miles_upper"`
	EscalationNumber  string `db:"escalation_number" csv:"escalation_number"`
	Rate              string `db:"rate" csv:"rate"`
}

StageDomesticLinehaulPrice is the stage domestic linehaul price

func (StageDomesticLinehaulPrice) TableName

func (s StageDomesticLinehaulPrice) TableName() string

TableName overrides the table name used by Pop.

type StageDomesticMoveAccessorialPrice

type StageDomesticMoveAccessorialPrice struct {
	ServicesSchedule string `db:"services_schedule" csv:"services_schedule"`
	ServiceProvided  string `db:"service_provided" csv:"service_provided"`
	PricePerUnit     string `db:"price_per_unit" csv:"price_per_unit"`
}

StageDomesticMoveAccessorialPrice is the stage domestic move accessorial price

func (StageDomesticMoveAccessorialPrice) TableName

TableName overrides the table name used by Pop.

type StageDomesticOtherPackPrice

type StageDomesticOtherPackPrice struct {
	ServicesSchedule   string `db:"services_schedule" csv:"services_schedule"`
	ServiceProvided    string `db:"service_provided" csv:"service_provided"`
	NonPeakPricePerCwt string `db:"non_peak_price_per_cwt" csv:"non_peak_price_per_cwt"`
	PeakPricePerCwt    string `db:"peak_price_per_cwt" csv:"peak_price_per_cwt"`
}

StageDomesticOtherPackPrice is the stage domestic other pack price

func (StageDomesticOtherPackPrice) TableName

func (s StageDomesticOtherPackPrice) TableName() string

TableName overrides the table name used by Pop.

type StageDomesticOtherSitPrice

type StageDomesticOtherSitPrice struct {
	SITPickupDeliverySchedule string `db:"sit_pickup_delivery_schedule" csv:"sit_pickup_delivery_schedule"`
	ServiceProvided           string `db:"service_provided" csv:"service_provided"`
	NonPeakPricePerCwt        string `db:"non_peak_price_per_cwt" csv:"non_peak_price_per_cwt"`
	PeakPricePerCwt           string `db:"peak_price_per_cwt" csv:"peak_price_per_cwt"`
}

StageDomesticOtherSitPrice is the stage domestic other SIT price

func (StageDomesticOtherSitPrice) TableName

func (s StageDomesticOtherSitPrice) TableName() string

TableName overrides the table name used by Pop.

type StageDomesticServiceArea

type StageDomesticServiceArea struct {
	BasePointCity     string `db:"base_point_city" csv:"base_point_city"`
	State             string `db:"state" csv:"state"`
	ServiceAreaNumber string `db:"service_area_number" csv:"service_area_number"`
	Zip3s             string `db:"zip3s" csv:"zip3s"`
}

StageDomesticServiceArea is the stage domestic service area

func (StageDomesticServiceArea) TableName

func (s StageDomesticServiceArea) TableName() string

TableName overrides the table name used by Pop.

type StageDomesticServiceAreaPrice

type StageDomesticServiceAreaPrice struct {
	ServiceAreaNumber                     string `db:"service_area_number" csv:"service_area_number"`
	ServiceAreaName                       string `db:"service_area_name" csv:"service_area_name"`
	ServicesSchedule                      string `db:"services_schedule" csv:"services_schedule"`
	SITPickupDeliverySchedule             string `db:"sit_pickup_delivery_schedule" csv:"sit_pickup_delivery_schedule"`
	Season                                string `db:"season" csv:"season"`
	ShorthaulPrice                        string `db:"shorthaul_price" csv:"shorthaul_price"`
	OriginDestinationPrice                string `db:"origin_destination_price" csv:"origin_destination_price"`
	OriginDestinationSITFirstDayWarehouse string `db:"origin_destination_sit_first_day_warehouse" csv:"origin_destination_sit_first_day_warehouse"`
	OriginDestinationSITAddlDays          string `db:"origin_destination_sit_addl_days" csv:"origin_destination_sit_addl_days"`
}

StageDomesticServiceAreaPrice is the stage domestic service area price

func (StageDomesticServiceAreaPrice) TableName

func (s StageDomesticServiceAreaPrice) TableName() string

TableName overrides the table name used by Pop.

type StageInternationalMoveAccessorialPrice

type StageInternationalMoveAccessorialPrice struct {
	Market          string `db:"market" csv:"market"`
	ServiceProvided string `db:"service_provided" csv:"service_provided"`
	PricePerUnit    string `db:"price_per_unit" csv:"price_per_unit"`
}

StageInternationalMoveAccessorialPrice is the stage international move accessorial price

func (StageInternationalMoveAccessorialPrice) TableName

TableName overrides the table name used by Pop.

type StageInternationalServiceArea

type StageInternationalServiceArea struct {
	RateArea   string `db:"rate_area" csv:"rate_area"`
	RateAreaID string `db:"rate_area_id" csv:"rate_area_id"`
}

StageInternationalServiceArea is the stage international service area

func (StageInternationalServiceArea) TableName

func (s StageInternationalServiceArea) TableName() string

TableName overrides the table name used by Pop.

type StageNonStandardLocnPrice

type StageNonStandardLocnPrice struct {
	OriginID        string `db:"origin_id" csv:"origin_id"`
	OriginArea      string `db:"origin_area" csv:"origin_area"`
	DestinationID   string `db:"destination_id" csv:"destination_id"`
	DestinationArea string `db:"destination_area" csv:"destination_area"`
	MoveType        string `db:"move_type" csv:"move_type"`
	Season          string `db:"season" csv:"season"`
	HHGPrice        string `db:"hhg_price" csv:"hhg_price"`
	UBPrice         string `db:"ub_price" csv:"ub_price"`
}

StageNonStandardLocnPrice is the stage non-standard location price

func (StageNonStandardLocnPrice) TableName

func (s StageNonStandardLocnPrice) TableName() string

TableName overrides the table name used by Pop.

type StageOconusToConusPrice

type StageOconusToConusPrice struct {
	OriginIntlPriceAreaID            string `db:"origin_intl_price_area_id" csv:"origin_intl_price_area_id"`
	OriginIntlPriceArea              string `db:"origin_intl_price_area" csv:"origin_intl_price_area"`
	DestinationDomesticPriceAreaCode string `db:"destination_domestic_price_area_area" csv:"destination_domestic_price_area_area"`
	DestinationDomesticPriceArea     string `db:"destination_domestic_price_area" csv:"destination_domestic_price_area"`
	Season                           string `db:"season" csv:"season"`
	HHGShippingLinehaulPrice         string `db:"hhg_shipping_linehaul_price" csv:"hhg_shipping_linehaul_price"`
	UBPrice                          string `db:"ub_price" csv:"ub_price"`
}

StageOconusToConusPrice is the stage OCONUS To CONUS price

func (StageOconusToConusPrice) TableName

func (s StageOconusToConusPrice) TableName() string

TableName overrides the table name used by Pop.

type StageOconusToOconusPrice

type StageOconusToOconusPrice struct {
	OriginIntlPriceAreaID      string `db:"origin_intl_price_area_id" csv:"origin_intl_price_area_id"`
	OriginIntlPriceArea        string `db:"origin_intl_price_area" csv:"origin_intl_price_area"`
	DestinationIntlPriceAreaID string `db:"destination_intl_price_area_id" csv:"destination_intl_price_area_id"`
	DestinationIntlPriceArea   string `db:"destination_intl_price_area" csv:"destination_intl_price_area"`
	Season                     string `db:"season" csv:"season"`
	HHGShippingLinehaulPrice   string `db:"hhg_shipping_linehaul_price" csv:"hhg_shipping_linehaul_price"`
	UBPrice                    string `db:"ub_price" csv:"ub_price"`
}

StageOconusToOconusPrice is the stage OCONUS To OCONUS price

func (StageOconusToOconusPrice) TableName

func (s StageOconusToOconusPrice) TableName() string

TableName overrides the table name used by Pop.

type StageOtherIntlPrice

type StageOtherIntlPrice struct {
	RateAreaCode                          string `db:"rate_area_code" csv:"rate_area_code"`
	RateAreaName                          string `db:"rate_area_name" csv:"rate_area_name"`
	HHGOriginPackPrice                    string `db:"hhg_origin_pack_price" csv:"hhg_origin_pack_price"`
	HHGDestinationUnPackPrice             string `db:"hhg_destination_unpack_price" csv:"hhg_destination_unpack_price"`
	UBOriginPackPrice                     string `db:"ub_origin_pack_price" csv:"ub_origin_pack_price"`
	UBDestinationUnPackPrice              string `db:"ub_destination_unpack_price" csv:"ub_destination_unpack_price"`
	OriginDestinationSITFirstDayWarehouse string `db:"origin_destination_sit_first_day_warehouse" csv:"origin_destination_sit_first_day_warehouse"`
	OriginDestinationSITAddlDays          string `db:"origin_destination_sit_addl_days" csv:"origin_destination_sit_addl_days"`
	SITLte50Miles                         string `db:"sit_lte_50_miles" csv:"sit_lte_50_miles"`
	SITGt50Miles                          string `db:"sit_gt_50_miles" csv:"sit_gt_50_miles"`
	Season                                string `db:"season" csv:"season"`
}

StageOtherIntlPrice is the stage other international price

func (StageOtherIntlPrice) TableName

func (s StageOtherIntlPrice) TableName() string

TableName overrides the table name used by Pop.

type StagePriceEscalationDiscount

type StagePriceEscalationDiscount struct {
	ContractYear          string `db:"contract_year" csv:"contract_year"`
	ForecastingAdjustment string `db:"forecasting_adjustment" csv:"forecasting_adjustment"`
	Discount              string `db:"discount" csv:"discount"`
	PriceEscalation       string `db:"price_escalation" csv:"price_escalation"`
}

StagePriceEscalationDiscount is the stage price escalation discount

func (StagePriceEscalationDiscount) TableName

func (s StagePriceEscalationDiscount) TableName() string

TableName overrides the table name used by Pop.

type StageShipmentManagementServicesPrice

type StageShipmentManagementServicesPrice struct {
	ContractYear      string `db:"contract_year" csv:"contract_year"`
	PricePerTaskOrder string `db:"price_per_task_order" csv:"price_per_task_order"`
}

StageShipmentManagementServicesPrice is the stage shipment management service price

func (StageShipmentManagementServicesPrice) TableName

TableName overrides the table name used by Pop.

type StageTransitionPrice

type StageTransitionPrice struct {
	ContractYear      string `db:"contract_year" csv:"contract_year"`
	PricePerTaskOrder string `db:"price_total_cost" csv:"price_total_cost"`
}

StageTransitionPrice is the stage transition price

func (StageTransitionPrice) TableName

func (s StageTransitionPrice) TableName() string

TableName overrides the table name used by Pop.

type StorageFacilities

type StorageFacilities []StorageFacility

type StorageFacility

type StorageFacility struct {
	ID           uuid.UUID  `json:"id" db:"id"`
	FacilityName string     `json:"facility_name" db:"facility_name"`
	Address      Address    `belongs_to:"addresses" fk_id:"address_id"`
	AddressID    uuid.UUID  `json:"address_id" db:"address_id"`
	LotNumber    *string    `json:"lot_number" db:"lot_number"`
	Phone        *string    `json:"phone" db:"phone"`
	Email        *string    `json:"email" db:"email"`
	CreatedAt    time.Time  `json:"created_at" db:"created_at"`
	UpdatedAt    time.Time  `json:"updated_at" db:"updated_at"`
	DeletedAt    *time.Time `json:"deleted_at" db:"deleted_at"`
}

func (StorageFacility) TableName

func (f StorageFacility) TableName() string

TableName overrides the table name used by Pop.

func (*StorageFacility) Validate

func (f *StorageFacility) Validate(_ *pop.Connection) (*validate.Errors, error)

type StringInList

type StringInList struct {
	Value     string
	FieldName string
	List      container
}

StringInList is an improved validators.StringInclusion validator with better error messages.

func NewStringInList

func NewStringInList(value string, fieldName string, list container) *StringInList

NewStringInList returns a new StringInList validator.

func (*StringInList) IsValid

func (v *StringInList) IsValid(errors *validate.Errors)

IsValid adds an error if the string value is blank.

type StringIsNilOrNotBlank

type StringIsNilOrNotBlank struct {
	Name  string
	Field *string
}

StringIsNilOrNotBlank validates OptionalString fields, which we represent as *string.

func (*StringIsNilOrNotBlank) IsValid

func (v *StringIsNilOrNotBlank) IsValid(errors *validate.Errors)

IsValid adds an error if the pointer is not nil and also an empty string.

type TPPSPaidInvoiceReportEntry

type TPPSPaidInvoiceReportEntry struct {
	ID                              uuid.UUID       `db:"id"`
	InvoiceNumber                   string          `db:"invoice_number"`
	TPPSCreatedDocumentDate         *time.Time      `json:"tpps_created_doc_date" db:"tpps_created_doc_date"`
	SellerPaidDate                  time.Time       `json:"seller_paid_date" db:"seller_paid_date"`
	InvoiceTotalChargesInMillicents unit.Millicents `json:"invoice_total_charges_in_millicents" db:"invoice_total_charges_in_millicents"`
	LineDescription                 string          `json:"line_description" db:"line_description"`
	ProductDescription              string          `json:"product_description" db:"product_description"`
	LineBillingUnits                int             `json:"line_billing_units" db:"line_billing_units"`
	LineUnitPrice                   unit.Millicents `json:"line_unit_price_in_millicents" db:"line_unit_price_in_millicents"`
	LineNetCharge                   unit.Millicents `json:"line_net_charge_in_millicents" db:"line_net_charge_in_millicents"`
	POTCN                           string          `json:"po_tcn" db:"po_tcn"`
	LineNumber                      string          `json:"line_number" db:"line_number"`
	FirstNoteCode                   *string         `json:"first_note_code" db:"first_note_code"`
	FirstNoteDescription            *string         `json:"first_note_description" db:"first_note_description"`
	FirstNoteCodeTo                 *string         `json:"first_note_to" db:"first_note_to"`
	FirstNoteCodeMessage            *string         `json:"first_note_message" db:"first_note_message"`
	SecondNoteCode                  *string         `json:"second_note_code" db:"second_note_code"`
	SecondNoteDescription           *string         `json:"second_note_description" db:"second_note_description"`
	SecondNoteCodeTo                *string         `json:"second_note_to" db:"second_note_to"`
	SecondNoteCodeMessage           *string         `json:"second_note_message" db:"second_note_message"`
	ThirdNoteCode                   *string         `json:"third_note_code" db:"third_note_code"`
	ThirdNoteDescription            *string         `json:"third_note_code_description" db:"third_note_code_description"`
	ThirdNoteCodeTo                 *string         `json:"third_note_code_to" db:"third_note_code_to"`
	ThirdNoteCodeMessage            *string         `json:"third_note_code_message" db:"third_note_code_message"`
	CreatedAt                       time.Time       `json:"created_at" db:"created_at"`
	UpdatedAt                       time.Time       `json:"updated_at" db:"updated_at"`
}

TPPSPaidInvoiceReportEntry stores the entries found from processing a TPPS paid invoice report

func (TPPSPaidInvoiceReportEntry) TableName

func (t TPPSPaidInvoiceReportEntry) TableName() string

TableName overrides the table name used by Pop.

func (*TPPSPaidInvoiceReportEntry) Validate

func (t *TPPSPaidInvoiceReportEntry) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type TPPSPaidInvoiceReportEntrys

type TPPSPaidInvoiceReportEntrys []TPPSPaidInvoiceReportEntry

TPPSPaidInvoiceReportEntrys is a slice of TPPSPaidInvoiceReportEntry

type TourType

type TourType string

TourType indicates whether the travel is Accompanied or Unaccompanied; i.e., are dependents authorized to accompany the service member on the move. For certain OCONUS destinations, the tour type affects the member's entitlement. Otherwise, it doesn't matter.

const (
	// TourTypeAccompanied captures enum value "accompanied"
	TourTypeAccompanied TourType = "accompanied"
	// TourTypeUnaccompanied captures enum value "unaccompanied"
	TourTypeUnaccompanied TourType = "unaccompanied"
	// TourTypeUnaccompaniedDependentsRestricted captures enum value "unaccompanied-dependents-restricted"
	TourTypeUnaccompaniedDependentsRestricted TourType = "unaccompanied-dependents-restricted"
)

type TransportationAccountingCode

type TransportationAccountingCode struct {
	ID                 uuid.UUID         `json:"id" db:"id" pipe:"-"` // Internal
	TAC                string            `json:"tac" db:"tac" pipe:"TRNSPRTN_ACNT_CD"`
	LoaID              *uuid.UUID        `json:"loa_id" db:"loa_id" pipe:"-"`                       // Internal
	LineOfAccounting   *LineOfAccounting `belongs_to:"lines_of_accounting" fk_id:"loa_id" pipe:"-"` // Internal
	TacSysID           *string           `json:"tac_sys_id" db:"tac_sys_id" pipe:"TAC_SYS_ID"`
	LoaSysID           *string           `json:"loa_sys_id" db:"loa_sys_id" pipe:"LOA_SYS_ID"`
	TacFyTxt           *string           `json:"tac_fy_txt" db:"tac_fy_txt" pipe:"TAC_FY_TXT"`
	TacFnBlModCd       *string           `json:"tac_fn_bl_mod_cd" db:"tac_fn_bl_mod_cd" pipe:"TAC_FN_BL_MOD_CD"`
	OrgGrpDfasCd       *string           `json:"org_grp_dfas_cd" db:"org_grp_dfas_cd" pipe:"ORG_GRP_DFAS_CD"`
	TacMvtDsgID        *string           `json:"tac_mvt_dsg_id" db:"tac_mvt_dsg_id" pipe:"TAC_MVT_DSG_ID"`
	TacTyCd            *string           `json:"tac_ty_cd" db:"tac_ty_cd" pipe:"TAC_TY_CD"`
	TacUseCd           *string           `json:"tac_use_cd" db:"tac_use_cd" pipe:"TAC_USE_CD"`
	TacMajClmtID       *string           `json:"tac_maj_clmt_id" db:"tac_maj_clmt_id" pipe:"TAC_MAJ_CLMT_ID"`
	TacBillActTxt      *string           `json:"tac_bill_act_txt" db:"tac_bill_act_txt" pipe:"TAC_BILL_ACT_TXT"`
	TacCostCtrNm       *string           `json:"tac_cost_ctr_nm" db:"tac_cost_ctr_nm" pipe:"TAC_COST_CTR_NM"`
	Buic               *string           `json:"buic" db:"buic" pipe:"BUIC"`
	TacHistCd          *string           `json:"tac_hist_cd" db:"tac_hist_cd" pipe:"TAC_HIST_CD"`
	TacStatCd          *string           `json:"tac_stat_cd" db:"tac_stat_cd" pipe:"TAC_STAT_CD"`
	TrnsprtnAcntTx     *string           `json:"trnsprtn_acnt_tx" db:"trnsprtn_acnt_tx" pipe:"TRNSPRTN_ACNT_TX"`
	TrnsprtnAcntBgnDt  *time.Time        `json:"trnsprtn_acnt_bgn_dt" db:"trnsprtn_acnt_bgn_dt" pipe:"TRNSPRTN_ACNT_BGN_DT"`
	TrnsprtnAcntEndDt  *time.Time        `json:"trnsprtn_acnt_end_dt" db:"trnsprtn_acnt_end_dt" pipe:"TRNSPRTN_ACNT_END_DT"`
	DdActvtyAdrsID     *string           `json:"dd_actvty_adrs_id" db:"dd_actvty_adrs_id" pipe:"DD_ACTVTY_ADRS_ID"`
	TacBlldAddFrstLnTx *string           `json:"tac_blld_add_frst_ln_tx" db:"tac_blld_add_frst_ln_tx" pipe:"TAC_BLLD_ADD_FRST_LN_TX"`
	TacBlldAddScndLnTx *string           `json:"tac_blld_add_scnd_ln_tx" db:"tac_blld_add_scnd_ln_tx" pipe:"TAC_BLLD_ADD_SCND_LN_TX"`
	TacBlldAddThrdLnTx *string           `json:"tac_blld_add_thrd_ln_tx" db:"tac_blld_add_thrd_ln_tx" pipe:"TAC_BLLD_ADD_THRD_LN_TX"`
	TacBlldAddFrthLnTx *string           `json:"tac_blld_add_frth_ln_tx" db:"tac_blld_add_frth_ln_tx" pipe:"TAC_BLLD_ADD_FRTH_LN_TX"`
	TacFnctPocNm       *string           `json:"tac_fnct_poc_nm" db:"tac_fnct_poc_nm" pipe:"TAC_FNCT_POC_NM"`
	CreatedAt          time.Time         `json:"created_at" db:"created_at" pipe:"-"` // Internal
	UpdatedAt          time.Time         `json:"updated_at" db:"updated_at" pipe:"-"` // Internal
}

TransportationAccountingCode model struct that represents transportation accounting codes TODO: Update this model and internal use to reflect incoming TransportationAccountingCode model updates. Don't forget to update the MakeDefaultTransportationAccountingCode function inside of the testdatagen package.

func (TransportationAccountingCode) TableName

func (t TransportationAccountingCode) TableName() string

TableName overrides the table name used by Pop.

func (*TransportationAccountingCode) Validate

func (t *TransportationAccountingCode) Validate(_ *pop.Connection) (*validate.Errors, error)

type TransportationOffice

type TransportationOffice struct {
	ID               uuid.UUID             `json:"id" db:"id"`
	ShippingOfficeID *uuid.UUID            `json:"shipping_office_id" db:"shipping_office_id"`
	ShippingOffice   *TransportationOffice `belongs_to:"transportation_offices" fk_id:"shipping_office_id"`
	Name             string                `json:"name" db:"name"`
	Address          Address               `belongs_to:"address" fk_id:"address_id"`
	AddressID        uuid.UUID             `json:"address_id" db:"address_id"`
	Latitude         float32               `json:"latitude" db:"latitude"`
	Longitude        float32               `json:"longitude" db:"longitude"`
	PhoneLines       OfficePhoneLines      `has_many:"office_phone_lines" fk_id:"transportation_office_id"`
	Emails           OfficeEmails          `has_many:"office_emails" fk_id:"transportation_office_id"`
	Hours            *string               `json:"hours" db:"hours"`
	Services         *string               `json:"services" db:"services"`
	Note             *string               `json:"note" db:"note"`
	Gbloc            string                `json:"gbloc" db:"gbloc"`
	CreatedAt        time.Time             `json:"created_at" db:"created_at"`
	UpdatedAt        time.Time             `json:"updated_at" db:"updated_at"`
	ProvidesCloseout bool                  `json:"provides_ppm_closeout" db:"provides_ppm_closeout"`
}

TransportationOffice is a PPPO, PPSO or JPPSO. If it is its own shipping office, ShippingOffice will be nil, otherwise it's a pointer to the actual shipping office.

func FetchDutyLocationTransportationOffice

func FetchDutyLocationTransportationOffice(db *pop.Connection, dutyLocationID uuid.UUID) (TransportationOffice, error)

FetchDutyLocationTransportationOffice returns a transportation office for a duty location

func FetchNearestTransportationOffice

func FetchNearestTransportationOffice(tx *pop.Connection, long float32, lat float32) (TransportationOffice, error)

FetchNearestTransportationOffice fetches the nearest transportation office

func (TransportationOffice) TableName

func (t TransportationOffice) TableName() string

TableName overrides the table name used by Pop.

func (*TransportationOffice) Validate

func (t *TransportationOffice) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type TransportationOffices

type TransportationOffices []TransportationOffice

type Upload

type Upload struct {
	ID          uuid.UUID  `db:"id"`
	Filename    string     `db:"filename"`
	Bytes       int64      `db:"bytes"`
	Rotation    *int64     `db:"rotation"`
	ContentType string     `db:"content_type"`
	Checksum    string     `db:"checksum"`
	StorageKey  string     `db:"storage_key"`
	UploadType  UploadType `db:"upload_type"`
	CreatedAt   time.Time  `db:"created_at"`
	UpdatedAt   time.Time  `db:"updated_at"`
	DeletedAt   *time.Time `db:"deleted_at"`
}

An Upload represents an uploaded file, such as an image or PDF.

func FetchUpload

func FetchUpload(dbConn *pop.Connection, uploadID uuid.UUID) (*Upload, error)

func (*Upload) BeforeCreate

func (u *Upload) BeforeCreate(_ *pop.Connection) error

BeforeCreate populates the StorageKey on a newly created UserUpload

func (Upload) TableName

func (u Upload) TableName() string

TableName overrides the table name used by Pop.

func (*Upload) Validate

func (u *Upload) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type UploadType

type UploadType string

UploadType represents the type of upload this is, whether is it uploaded for a User or for the Prime

const (
	// UploadTypeUSER string USER
	UploadTypeUSER UploadType = "USER"
	// UploadTypePRIME string PRIME
	UploadTypePRIME UploadType = "PRIME"
	// UploadTypePRIME string OFFICE
	UploadTypeOFFICE UploadType = "OFFICE"
)

func (UploadType) Valid

func (ut UploadType) Valid() bool

Valid checks if UploadType is set to a valid value

type Uploads

type Uploads []Upload

func UploadsFromPrimeUploads

func UploadsFromPrimeUploads(db *pop.Connection, primeUploads PrimeUploads) (Uploads, error)

UploadsFromPrimeUploads return a slice of uploads given a slice of prime uploads

func UploadsFromUserUploads

func UploadsFromUserUploads(db *pop.Connection, userUploads UserUploads) (Uploads, error)

UploadsFromUserUploads returns a slice of Uploads given a slice of UserUploads

func UploadsFromUserUploadsNoDatabase

func UploadsFromUserUploadsNoDatabase(userUploads UserUploads) (Uploads, error)

UploadsFromUserUploadsNoDatabase returns a slice of Uploads given a slice of UserUploads

type UsPostRegionCity

type UsPostRegionCity struct {
	ID                      uuid.UUID `db:"id" json:"id"`
	UsprZipID               string    `db:"uspr_zip_id" json:"uspr_zip_id"`
	USPostRegionCityNm      string    `db:"u_s_post_region_city_nm" json:"u_s_post_region_city_nm"`
	UsprcPrfdLstLineCtystNm string    `db:"usprc_prfd_lst_line_ctyst_nm" json:"usprc_prfd_lst_line_ctyst_nm"`
	UsprcCountyNm           string    `db:"usprc_county_nm" json:"usprc_county_nm"`
	CtryGencDgphCd          string    `db:"ctry_genc_dgph_cd" json:"ctry_genc_dgph_cd"`
	CreatedAt               time.Time `db:"created_at" json:"created_at"`
	UpdatedAt               time.Time `db:"updated_at" json:"updated_at"`
}

UsPostRegionCity represents postal region information retrieved from TRDM

Column comments uspr_zip_id IS 'A US postal region zip identifier.'; u_s_post_region_city_nm IS 'A US postal region city name.'; usprc_prfd_lst_line_ctyst_nm IS 'A US postal region city preferred last line city state name.'; usprc_county_nm IS 'A name of the county or parish in which the UNITED-STATES- POSTAL-REGION-CITY resides.'; ctry_genc_dgph_cd IS 'A 2-digit Geopolitical Entities, Names, and Codes (GENC) Standard.';

func (*UsPostRegionCity) Validate

func (usprc *UsPostRegionCity) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type User

type User struct {
	ID                     uuid.UUID   `json:"id" db:"id"`
	CreatedAt              time.Time   `json:"created_at" db:"created_at"`
	UpdatedAt              time.Time   `json:"updated_at" db:"updated_at"`
	OktaID                 string      `json:"okta_id" db:"okta_id"`
	OktaEmail              string      `json:"okta_email" db:"okta_email"`
	Active                 bool        `json:"active" db:"active"`
	Roles                  roles.Roles `many_to_many:"users_roles"`
	Privileges             Privileges  `many_to_many:"users_privileges"`
	CurrentAdminSessionID  string      `json:"current_admin_session_id" db:"current_admin_session_id"`
	CurrentOfficeSessionID string      `json:"current_office_session_id" db:"current_office_session_id"`
	CurrentMilSessionID    string      `json:"current_mil_session_id" db:"current_mil_session_id"`
}

User is an entity with a registered profile ID and email in Okta

func CreateUser

func CreateUser(db *pop.Connection, oktaID string, email string) (*User, error)

CreateUser is called upon successful Okta verification of a new user

func GetUser

func GetUser(db *pop.Connection, userID uuid.UUID) (*User, error)

GetUser loads the associated User from the DB using the user ID

func GetUserFromEmail

func GetUserFromEmail(db *pop.Connection, email string) (*User, error)

GetUserFromEmail loads the associated User from the DB using the user email

func (User) TableName

func (u User) TableName() string

TableName overrides the table name used by Pop.

func (*User) Validate

func (u *User) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type UserIdentity

type UserIdentity struct {
	ID                        uuid.UUID   `db:"id"`
	Active                    bool        `db:"active"`
	Email                     string      `db:"email"`
	ServiceMemberID           *uuid.UUID  `db:"sm_id"`
	ServiceMemberFirstName    *string     `db:"sm_fname"`
	ServiceMemberLastName     *string     `db:"sm_lname"`
	ServiceMemberMiddle       *string     `db:"sm_middle"`
	ServiceMemberCacValidated *bool       `db:"sm_cac_validated"`
	OfficeUserID              *uuid.UUID  `db:"ou_id"`
	OfficeUserFirstName       *string     `db:"ou_fname"`
	OfficeUserLastName        *string     `db:"ou_lname"`
	OfficeUserMiddle          *string     `db:"ou_middle"`
	OfficeActive              *bool       `db:"ou_active"`
	AdminUserID               *uuid.UUID  `db:"au_id"`
	AdminUserRole             *AdminRole  `db:"au_role"`
	AdminUserFirstName        *string     `db:"au_fname"`
	AdminUserLastName         *string     `db:"au_lname"`
	AdminUserActive           *bool       `db:"au_active"`
	Roles                     roles.Roles `many_to_many:"users_roles" primary_id:"user_id"`
	Privileges                Privileges  `many_to_many:"users_privileges" primary_id:"user_id"`
}

UserIdentity is summary of the information about a user from the database

func FetchAppUserIdentities

func FetchAppUserIdentities(db *pop.Connection, appname auth.Application, limit int) ([]UserIdentity, error)

FetchAppUserIdentities returns a limited set of user records based on application

func FetchUserIdentity

func FetchUserIdentity(db *pop.Connection, oktaID string) (*UserIdentity, error)

FetchUserIdentity queries the database for information about the logged in user

func (*UserIdentity) FirstName

func (ui *UserIdentity) FirstName() string

FirstName gets the firstname of the user from either the ServiceMember or OfficeUser identity

func (*UserIdentity) LastName

func (ui *UserIdentity) LastName() string

LastName gets the firstname of the user from either the ServiceMember or OfficeUser or TspUser identity

func (*UserIdentity) Middle

func (ui *UserIdentity) Middle() string

Middle gets the MiddleName or Initials from the ServiceMember or OfficeUser or TspUser Identity

type UserUpload

type UserUpload struct {
	ID         uuid.UUID  `db:"id"`
	DocumentID *uuid.UUID `db:"document_id"`
	Document   Document   `belongs_to:"documents" fk_id:"document_id"`
	UploaderID uuid.UUID  `db:"uploader_id"`
	UploadID   uuid.UUID  `db:"upload_id"`
	Upload     Upload     `belongs_to:"uploads" fk_id:"upload_id"`
	CreatedAt  time.Time  `db:"created_at"`
	UpdatedAt  time.Time  `db:"updated_at"`
	DeletedAt  *time.Time `db:"deleted_at"`
}

An UserUpload represents an user uploaded file, such as an image or PDF.

func FetchUserUpload

func FetchUserUpload(db *pop.Connection, session *auth.Session, id uuid.UUID) (UserUpload, error)

FetchUserUpload returns an UserUpload if the user has access to that upload

func FetchUserUploadFromUploadID

func FetchUserUploadFromUploadID(db *pop.Connection, session *auth.Session, uploadID uuid.UUID) (UserUpload, error)

FetchUserUploadFromUploadID returns an UserUpload if the user has access to that upload

func (UserUpload) TableName

func (u UserUpload) TableName() string

TableName overrides the table name used by Pop.

func (*UserUpload) Validate

func (u *UserUpload) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type UserUploads

type UserUploads []UserUpload

func (UserUploads) FilterDeleted

func (u UserUploads) FilterDeleted() UserUploads

type Users

type Users []User

type UsersPrivileges

type UsersPrivileges struct {
	ID          uuid.UUID  `db:"id"`
	UserID      uuid.UUID  `db:"user_id"`
	PrivilegeID uuid.UUID  `db:"privilege_id"`
	CreatedAt   time.Time  `db:"created_at"`
	UpdateAt    time.Time  `db:"updated_at"`
	DeletedAt   *time.Time `db:"deleted_at"`
}

UsersPrivileges represents a user and a privilege

func (UsersPrivileges) TableName

func (u UsersPrivileges) TableName() string

TableName overrides the table name used by Pop.

type UsersRoles

type UsersRoles struct {
	ID        uuid.UUID  `db:"id"`
	UserID    uuid.UUID  `db:"user_id"`
	RoleID    uuid.UUID  `db:"role_id"`
	CreatedAt time.Time  `db:"created_at"`
	UpdateAt  time.Time  `db:"updated_at"`
	DeletedAt *time.Time `db:"deleted_at"`
}

UsersRoles represents a user and a role

func (UsersRoles) TableName

func (u UsersRoles) TableName() string

TableName overrides the table name used by Pop.

type ValidateableModel

type ValidateableModel interface {
	Validate(*pop.Connection) (*validate.Errors, error)
}

ValidateableModel is here simply because `validateable` is private to `pop`

type WebhookNotification

type WebhookNotification struct {
	ID               uuid.UUID                 `db:"id"`
	EventKey         string                    `db:"event_key"`
	TraceID          *uuid.UUID                `db:"trace_id"`
	MoveTaskOrderID  *uuid.UUID                `db:"move_id"`
	MoveTaskOrder    Move                      `belongs_to:"moves" fk_id:"move_id"`
	ObjectID         *uuid.UUID                `db:"object_id"`
	Payload          string                    `db:"payload"`
	Status           WebhookNotificationStatus `db:"status"`
	CreatedAt        time.Time                 `db:"created_at"`
	UpdatedAt        time.Time                 `db:"updated_at"`
	FirstAttemptedAt *time.Time                `db:"first_attempted_at"`
}

WebhookNotification is used by pop to map your webhook_notifications database table to your go code.

func (WebhookNotification) String

func (w WebhookNotification) String() string

func (WebhookNotification) TableName

func (w WebhookNotification) TableName() string

TableName overrides the table name used by Pop.

func (*WebhookNotification) Validate

func (w *WebhookNotification) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type WebhookNotificationStatus

type WebhookNotificationStatus string

WebhookNotificationStatus represents the possible statuses for a mto shipment

const (
	// WebhookNotificationPending is the pending status type for a WebhookNotification
	WebhookNotificationPending WebhookNotificationStatus = "PENDING"
	// WebhookNotificationSent is the sent status type for a WebhookNotification
	WebhookNotificationSent WebhookNotificationStatus = "SENT"
	// WebhookNotificationSkipped is the skipped status type for a WebhookNotification
	WebhookNotificationSkipped WebhookNotificationStatus = "SKIPPED"
	// WebhookNotificationFailing is the failing status type for a WebhookNotification
	// - indicates the send has failed at least once but we are still retrying it
	WebhookNotificationFailing WebhookNotificationStatus = "FAILING"
	// WebhookNotificationFailed is the failed status type for a WebhookNotification
	WebhookNotificationFailed WebhookNotificationStatus = "FAILED"
)

type WebhookNotifications

type WebhookNotifications []WebhookNotification

func (WebhookNotifications) String

func (w WebhookNotifications) String() string

type WebhookSubscription

type WebhookSubscription struct {
	ID           uuid.UUID                 `db:"id"`
	Subscriber   Contractor                `belongs_to:"contractors" fk_id:"subscriber_id"`
	SubscriberID uuid.UUID                 `db:"subscriber_id"`
	Status       WebhookSubscriptionStatus `db:"status"`
	Severity     int                       `db:"severity"` // Zero indicates no severity value, 1 is highest
	EventKey     string                    `db:"event_key"`
	CallbackURL  string                    `db:"callback_url"`
	CreatedAt    time.Time                 `db:"created_at"`
	UpdatedAt    time.Time                 `db:"updated_at"`
}

A WebhookSubscription represents a webhook subscription

func (WebhookSubscription) TableName

func (wS WebhookSubscription) TableName() string

TableName overrides the table name used by Pop.

func (*WebhookSubscription) Validate

func (wS *WebhookSubscription) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type WebhookSubscriptionStatus

type WebhookSubscriptionStatus string

WebhookSubscriptionStatus is a type representing the webhook subscription status type - string

const (
	// WebhookSubscriptionStatusActive is the active status for Webhook Subscription
	WebhookSubscriptionStatusActive WebhookSubscriptionStatus = "ACTIVE"
	// WebhookSubscriptionStatusDisabled is the disabled status for Webhook Subscription
	WebhookSubscriptionStatusDisabled WebhookSubscriptionStatus = "DISABLED"
	// WebhookSubscriptionStatusFailing is the failing status for Webhook Subscription
	// - it indicates that we have experienced notifications failing to be sent, but
	// have not disabled this subscription yet.
	WebhookSubscriptionStatusFailing WebhookSubscriptionStatus = "FAILING"
)

type WebhookSubscriptions

type WebhookSubscriptions []WebhookSubscription

WebhookSubscriptions is an array of webhook subscriptions

type WeightAllotment

type WeightAllotment struct {
	TotalWeightSelf               int
	TotalWeightSelfPlusDependents int
	ProGearWeight                 int
	ProGearWeightSpouse           int
}

WeightAllotment represents the weights allotted for a rank

func GetWeightAllotment

func GetWeightAllotment(grade internalmessages.OrderPayGrade) WeightAllotment

GetWeightAllotment returns the weight allotments for a given pay grade.

type WeightTicket

type WeightTicket struct {
	ID                                uuid.UUID          `json:"id" db:"id"`
	PPMShipmentID                     uuid.UUID          `json:"ppm_shipment_id" db:"ppm_shipment_id"`
	PPMShipment                       PPMShipment        `belongs_to:"ppm_shipments" fk_id:"ppm_shipment_id"`
	CreatedAt                         time.Time          `json:"created_at" db:"created_at"`
	UpdatedAt                         time.Time          `json:"updated_at" db:"updated_at"`
	DeletedAt                         *time.Time         `json:"deleted_at" db:"deleted_at"`
	VehicleDescription                *string            `json:"vehicle_description" db:"vehicle_description"`
	EmptyWeight                       *unit.Pound        `json:"empty_weight" db:"empty_weight"`
	SubmittedEmptyWeight              *unit.Pound        `json:"submitted_empty_weight" db:"submitted_empty_weight"`
	MissingEmptyWeightTicket          *bool              `json:"missing_empty_weight_ticket" db:"missing_empty_weight_ticket"`
	EmptyDocumentID                   uuid.UUID          `json:"empty_document_id" db:"empty_document_id"`
	EmptyDocument                     Document           `belongs_to:"documents" fk_id:"empty_document_id"`
	FullWeight                        *unit.Pound        `json:"full_weight" db:"full_weight"`
	SubmittedFullWeight               *unit.Pound        `json:"submitted_full_weight" db:"submitted_full_weight"`
	MissingFullWeightTicket           *bool              `json:"missing_full_weight_ticket" db:"missing_full_weight_ticket"`
	FullDocumentID                    uuid.UUID          `json:"full_document_id" db:"full_document_id"`
	FullDocument                      Document           `belongs_to:"documents" fk_id:"full_document_id"`
	OwnsTrailer                       *bool              `json:"owns_trailer" db:"owns_trailer"`
	SubmittedOwnsTrailer              *bool              `json:"submitted_owns_trailer" db:"submitted_owns_trailer"`
	TrailerMeetsCriteria              *bool              `json:"trailer_meets_criteria" db:"trailer_meets_criteria"`
	SubmittedTrailerMeetsCriteria     *bool              `json:"submitted_trailer_meets_criteria" db:"submitted_trailer_meets_criteria"`
	ProofOfTrailerOwnershipDocumentID uuid.UUID          `json:"proof_of_trailer_ownership_document_id" db:"proof_of_trailer_ownership_document_id"`
	ProofOfTrailerOwnershipDocument   Document           `belongs_to:"documents" fk_id:"proof_of_trailer_ownership_document_id"`
	Status                            *PPMDocumentStatus `json:"status" db:"status"`
	Reason                            *string            `json:"reason" db:"reason"`
	AdjustedNetWeight                 *unit.Pound        `json:"adjusted_net_weight" db:"adjusted_net_weight"`
	NetWeightRemarks                  *string            `json:"net_weight_remarks" db:"net_weight_remarks"`
	AllowableWeight                   *unit.Pound        `json:"allowable_weight" db:"allowable_weight"`
}

WeightTicket represents the weight tickets and related data for a single trip of a PPM Shipment. Each trip should be its own record.

func (WeightTicket) TableName

func (w WeightTicket) TableName() string

TableName overrides the table name used by Pop.

func (*WeightTicket) Validate

func (w *WeightTicket) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This should contain validation that is for data integrity. Business validation should occur in service objects.

type WeightTickets

type WeightTickets []WeightTicket

func (WeightTickets) FilterDeleted

func (e WeightTickets) FilterDeleted() WeightTickets

type WorkSheetShipment

type WorkSheetShipment struct {
	EstimatedIncentive          string
	MaxAdvance                  string
	FinalIncentive              string
	AdvanceAmountReceived       string
	ShipmentNumberAndTypes      string
	PickUpDates                 string
	ShipmentWeights             string
	ShipmentWeightForObligation string
	CurrentShipmentStatuses     string
}

WorkSheetShipment is an object representing specific shipment items on Shipment Summary Worksheet

type WorkSheetShipments

type WorkSheetShipments struct {
	ShipmentNumberAndTypes      string
	PickUpDates                 string
	ShipmentWeights             string
	ShipmentWeightForObligation string
	CurrentShipmentStatuses     string
}

WorkSheetShipments is an object representing shipment line items on Shipment Summary Worksheet

type Zip3Distance

type Zip3Distance struct {
	ID            uuid.UUID `json:"id" db:"id"`
	FromZip3      string    `json:"from_zip3" db:"from_zip3"`
	ToZip3        string    `json:"to_zip3" db:"to_zip3"`
	DistanceMiles int       `json:"distance_miles" db:"distance_miles"`
	CreatedAt     time.Time `json:"created_at" db:"created_at"`
	UpdatedAt     time.Time `json:"updated_at" db:"updated_at"`
}

Zip3Distance model struct

func (Zip3Distance) TableName

func (z Zip3Distance) TableName() string

TableName overrides the table name used by Pop.

func (*Zip3Distance) Validate

func (z *Zip3Distance) Validate(_ *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method.

type Zip3Distances

type Zip3Distances []Zip3Distance

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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