2021-01-10 23:44:39 +00:00
|
|
|
package app
|
2021-01-10 18:40:46 +00:00
|
|
|
|
2021-01-12 05:46:24 +00:00
|
|
|
import (
|
|
|
|
"database/sql"
|
|
|
|
|
|
|
|
"code.tnxs.net/taxnexus/lib/api/ops/ops_models"
|
|
|
|
)
|
|
|
|
|
|
|
|
// OrderChannelWrapper wraps the object with the security principal
|
|
|
|
type OrderChannelWrapper struct {
|
|
|
|
Obj ops_models.Order
|
|
|
|
Principal User
|
2021-01-13 05:30:35 +00:00
|
|
|
SagaID string
|
|
|
|
SagaType string
|
2021-01-12 05:46:24 +00:00
|
|
|
}
|
2021-01-10 18:40:46 +00:00
|
|
|
|
|
|
|
// Order is a first class object type
|
|
|
|
type Order struct {
|
|
|
|
ID string
|
|
|
|
AccountID string
|
|
|
|
ActivatedByID string
|
|
|
|
ActivatedDate sql.NullTime
|
|
|
|
Amount float64
|
|
|
|
AmountDue float64
|
|
|
|
BillingAddress *Address
|
|
|
|
BillingContactID string
|
|
|
|
BusinessAddress *Address
|
|
|
|
BusinessTax float64
|
|
|
|
CannabisTax float64
|
|
|
|
CompanyAuthorizedByID string
|
|
|
|
CompanyAuthorizedDate sql.NullTime
|
|
|
|
Completion string
|
|
|
|
ContractEndDate sql.NullTime
|
|
|
|
ContractID string
|
|
|
|
CoordinateID string
|
|
|
|
CreatedByID string
|
|
|
|
CreatedDate sql.NullTime
|
|
|
|
CustomerAuthorizedByID string
|
|
|
|
CustomerAuthorizedDate sql.NullTime
|
|
|
|
CustomerID string
|
|
|
|
Description string
|
|
|
|
Discount float64
|
|
|
|
DiscountAmount float64
|
|
|
|
EffectiveDate sql.NullTime
|
|
|
|
EndDate sql.NullTime
|
|
|
|
EndUserID string
|
|
|
|
EstimatedAmount float64
|
|
|
|
EstimatedBusinessTax float64
|
|
|
|
EstimatedCannabisTax float64
|
|
|
|
EstimatedCOGS float64
|
|
|
|
EstimatedDiscount float64
|
|
|
|
EstimatedSalesTax float64
|
|
|
|
EstimatedSubtotal float64
|
|
|
|
IngestID string
|
|
|
|
InstallationDate sql.NullTime
|
|
|
|
InvoiceID string
|
|
|
|
IsReductionOrder bool
|
|
|
|
Items []*OrderItem
|
|
|
|
JobID string
|
|
|
|
LastModifiedByID string
|
|
|
|
LastModifiedDate sql.NullTime
|
|
|
|
MonthlyAmount float64
|
|
|
|
Open bool
|
|
|
|
OpportunityID string
|
|
|
|
OrderNumber string
|
|
|
|
OrderReferenceNumber string
|
|
|
|
OriginalOrderID string
|
|
|
|
OwnerID string
|
|
|
|
ParentFK string
|
|
|
|
PaymentMethodID string
|
|
|
|
PaymentTerms string
|
|
|
|
PeriodID string
|
|
|
|
PlaceGeoCode string
|
|
|
|
PODate sql.NullTime
|
|
|
|
Posted bool
|
|
|
|
ProvisioningStatus string
|
|
|
|
PurchaseAmount float64
|
|
|
|
PurchaseOrderID string
|
|
|
|
QuoteID string
|
|
|
|
RatingEngineID string
|
|
|
|
RecordTypeID string
|
|
|
|
Ref string
|
|
|
|
SalesRegulation string
|
|
|
|
SalesTax float64
|
|
|
|
ServiceTerm string
|
|
|
|
ShippingAddress *Address
|
|
|
|
ShippingContactID string
|
|
|
|
ShippingHandling float64
|
|
|
|
Status string
|
|
|
|
Subtotal float64
|
|
|
|
TaxTransactions []*TaxTransaction
|
|
|
|
TelecomTax float64
|
|
|
|
TemplateID string
|
|
|
|
TenantID string
|
|
|
|
Total *Total
|
|
|
|
TotalID string
|
|
|
|
Type string
|
|
|
|
}
|