Documentation
¶
Index ¶
- func CollectionInvoices(ctx context.Context, log *logrus.Entry, stage string) (*mongo.Collection, error)
- func CollectionOrders(ctx context.Context, log *logrus.Entry, stage string) (*mongo.Collection, error)
- func CollectionResult(ctx context.Context, log *logrus.Entry, stage string) (*mongo.Collection, error)
- func Disconnect(ctx context.Context, log *logrus.Entry)
- func UpdateFromPatch(req rest.PatchRequest) (interface{}, error)
- type Applicant
- type Billing
- type Invoice
- type InvoiceItem
- type Order
- type Result
- type ResultFile
- type Trip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectionInvoices ¶ added in v1.1.5
func CollectionOrders ¶ added in v1.0.1
func CollectionResult ¶ added in v1.0.6
func UpdateFromPatch ¶ added in v1.0.16
func UpdateFromPatch(req rest.PatchRequest) (interface{}, error)
UpdateFromPatch convert JSON Patch to mongodb update object
Types ¶
type Applicant ¶ added in v1.0.1
type Applicant struct {
FirstName string `bson:"firstName" json:"firstName"`
LastName string `bson:"lastName" json:"lastName"`
DateOfBirth string `bson:"dateOfBirth" json:"dateOfBirth"`
Sex string `bson:"sex" json:"sex"`
Nationality string `bson:"nationality" json:"nationality"`
PassportNumber string `bson:"passportNumber" json:"passportNumber"`
PassportExpiry string `bson:"passportExpiry" json:"passportExpiry"`
VisaS3Key string `bson:"visaS3Key" json:"visaS3Key"`
VisaSent bool `bson:"visaSent" json:"visaSent"`
}
type InvoiceItem ¶ added in v1.1.5
type InvoiceItem struct {
ID primitive.ObjectID `bson:"_id" json:"id"`
PassportNumber string `bson:"passportNumber" json:"passportNumber"`
Name string `bson:"name" json:"name"`
Country string `bson:"country" json:"country"`
Service string `bson:"service" json:"service"`
OrderDate string `bson:"orderDate" json:"orderDate"`
ArrivalDate string `bson:"arrivalDate" json:"arrivalDate"`
Port string `bson:"port" json:"port"`
Cost string `bson:"cost" json:"cost"`
Found bool `bson:"found" json:"found"`
Comment string `bson:"comment" json:"comment"`
}
type Order ¶ added in v1.0.1
type Order struct {
ID primitive.ObjectID `bson:"_id" json:"id"`
OrderID int `bson:"orderId" json:"orderId"`
Total string `bson:"total" json:"total"`
OrderKey string `bson:"orderKey" json:"orderKey"`
Billing Billing `bson:"billing" json:"billing"`
PaymentMethodTitle string `bson:"paymentMethodTitle" json:"paymentMethodTitle"`
Number string `bson:"number" json:"number"`
Trip Trip `bson:"trip" json:"trip"`
Applicants []Applicant `bson:"applicants" json:"applicants"`
AllVisaSent bool `bson:"allVisaSent" json:"allVisaSent"`
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"`
}
type ResultFile ¶ added in v1.0.6
type ResultFile struct {
Name string `bson:"name" json:"name"`
Processed bool `bson:"processed" json:"processed"`
ErrorMessage string `bson:"errorMessage" json:"errorMessage"`
OrderNumber string `bson:"orderNumber" json:"orderNumber"`
// PassportNumber used to match CV manually
PassportNumber string `bson:"passportNumber" json:"passportNumber"`
}
type Trip ¶ added in v1.0.1
type Trip struct {
ArrivalDate string `bson:"arrivalDate" json:"arrivalDate"`
Checkpoint string `bson:"checkpoint" json:"checkpoint"`
ProcessingTime string `bson:"processingTime" json:"processingTime"`
FastTrack string `bson:"fastTrack" json:"fastTrack"`
CarPickup bool `bson:"carPickup" json:"carPickup"`
Flight string `bson:"flight" json:"flight"`
CarPickupAddress string `bson:"carPickupAddress" json:"carPickupAddress"`
}
Click to show internal directories.
Click to hide internal directories.