db

package
v2.27.12 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationTypeEVisa         = "e_visa"
	ApplicationTypeVisaOnArrival = "visa_on_arrival"
)
View Source
const (
	ProcessingTimeNormal  = "10-12 working days"
	ProcessingTime2Days   = "2 working days"
	ProcessingTime1Days   = "1 working day"
	ProcessingTimeSameDay = "Same day"
	ProcessingTimeUrgent  = "Urgent"
)
View Source
const (
	VisaType1MonthSingle   = "1 month single entry"
	VisaType1MonthMultiple = "1 month multiple entry"
	VisaType3MonthSingle   = "3 months single entry"
	VisaType3MonthMultiple = "3 months multiple entry"
)
View Source
const (
	FastTrackNo     = "No"
	FastTrackNormal = "Normal fast-track"
	FastTrackVIP    = "VIP fast-track"
)
View Source
const (
	CarNo  = "No"
	CarYes = "Yes"
)
View Source
const MailingListAll = "all"

Variables

This section is empty.

Functions

func CollectionConfiguration added in v2.20.0

func CollectionConfiguration(ctx context.Context) (*mongo.Collection, error)

func CollectionEmail added in v2.12.0

func CollectionEmail(ctx context.Context) (*mongo.Collection, error)

func CollectionOrder

func CollectionOrder(ctx context.Context) (*mongo.Collection, error)

func CollectionPrice added in v2.18.0

func CollectionPrice(ctx context.Context) (*mongo.Collection, error)

Types

type Applicant

type Applicant struct {
	PortraitFile       string `bson:"portraitFile" json:"portraitFile"`
	PassportFile       string `bson:"passportFile" json:"passportFile"`
	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"`
	AddressHome        string `bson:"addressHome" json:"addressHome"`
	PhoneNumberHome    string `bson:"phoneNumberHome" json:"phoneNumberHome"`
	AddressVietnam     string `bson:"addressVietnam" json:"addressVietnam"`
	PreviousVisitCount string `bson:"previousVisitCount" json:"previousVisitCount"`
	LawViolation       string `bson:"lawViolation" json:"lawViolation"`
}

type BillingItem

type BillingItem struct {
	Description string `bson:"description" json:"description"`
	UnitPrice   int    `bson:"unitPrice" json:"unitPrice"`
	Quantity    int    `bson:"quantity" json:"quantity"`
	Total       int    `bson:"total" json:"total"`
}

type CartBilling

type CartBilling struct {
	FirstName string `bson:"firstName" json:"firstName"`
	LastName  string `bson:"lastName" json:"lastName"`
	Phone     string `bson:"phone" json:"phone"`
	Email     string `bson:"email" json:"email"`
	Email2    string `bson:"email2" json:"email2"`
}

type CartOptions

type CartOptions struct {
	VisaType       string `bson:"visaType" json:"visaType"`
	VisitPurpose   string `bson:"visitPurpose" json:"visitPurpose"`
	ArrivalDate    string `bson:"arrivalDate" json:"arrivalDate"`
	Entry          string `bson:"entry" json:"entry"`
	ProcessingTime string `bson:"processingTime" json:"processingTime"`
	FastTrack      string `bson:"fastTrack" json:"fastTrack"`
	Car            string `bson:"car" json:"car"`
	Flight         string `bson:"flight" json:"flight"`
	Hotel          string `bson:"hotel" json:"hotel"`
	Subscribed     *bool  `bson:"subscribed,omitempty" json:"subscribed,omitempty"`
}

type Configuration added in v2.20.0

type Configuration struct {
	ID        primitive.ObjectID `bson:"_id" json:"id"`
	Key       string             `bson:"key" json:"key"`
	BoolValue *bool              `bson:"boolValue,omitempty" json:"boolValue,omitempty"`
}

type Email added in v2.12.0

type Email struct {
	ID                       primitive.ObjectID `bson:"_id" json:"id"`
	Email                    string             `bson:"email" json:"email"`
	Secret                   string             `bson:"secret" json:"secret"`
	FirstName                string             `bson:"firstName" json:"firstName"`
	LastName                 string             `bson:"lastName" json:"lastName"`
	FullName                 string             `bson:"fullName" json:"fullName"`
	UnsubscribedMailingLists []string           `bson:"unsubscribedMailingLists" json:"unsubscribedMailingLists"`
	AlreadySentCampaigns     []string           `bson:"alreadySentCampaigns" json:"alreadySentCampaigns"`
	Complaints               []any              `bson:"complaints" json:"complaints"`
	Exported                 bool               `bson:"exported" json:"exported"` // Exported indicates if the email has been exported to the mailing list in mailjet
	CreatedAt                time.Time          `bson:"createdAt" json:"createdAt"`
	UpdatedAt                time.Time          `bson:"updatedAt" json:"updatedAt"`
}

type Order

type Order struct {
	UIOrder
	ID               primitive.ObjectID `bson:"_id" json:"id"`
	OrderNumber      string             `bson:"orderNumber" json:"orderNumber"`
	BillingItems     []BillingItem      `bson:"billingItems" json:"billingItems"`
	Summary          OrderSummary       `bson:"summary" json:"summary"`
	Secret           string             `bson:"secret" json:"secret"`
	CreatedAt        time.Time          `bson:"createdAt" json:"createdAt"`
	PaymentCreatedAt *time.Time         `bson:"paymentCreatedAt,omitempty" json:"paymentCreatedAt,omitempty"`
	PaidAt           *time.Time         `bson:"paidAt,omitempty" json:"paidAt,omitempty"`
}

type OrderSummary

type OrderSummary struct {
	Total int `bson:"total" json:"total"`
}

type Price added in v2.18.0

type Price struct {
	ID    primitive.ObjectID `bson:"_id" json:"id"`
	Key   PriceKey           `bson:"key" json:"key"`
	Value string             `bson:"value" json:"value"`
}

type PriceKey added in v2.18.0

type PriceKey string
const (
	PriceKeyEVisaNormal1MonthSingle PriceKey = "E_VISA_NORMAL_1_MONTH_SINGLE"
	PriceKeyEVisaNormal1MonthMulti  PriceKey = "E_VISA_NORMAL_1_MONTH_MULTI"
	PriceKeyEVisaNormal3MonthSingle PriceKey = "E_VISA_NORMAL_3_MONTH_SINGLE"
	PriceKeyEVisaNormal3MonthMulti  PriceKey = "E_VISA_NORMAL_3_MONTH_MULTI"
	PriceKeyEVisa2Day1MonthSingle   PriceKey = "E_VISA_2_DAY_1_MONTH_SINGLE"
	PriceKeyEVisa2Day1MonthMulti    PriceKey = "E_VISA_2_DAY_1_MONTH_MULTI"
	PriceKeyEVisa2Day3MonthSingle   PriceKey = "E_VISA_2_DAY_3_MONTH_SINGLE"
	PriceKeyEVisa2Day3MonthMulti    PriceKey = "E_VISA_2_DAY_3_MONTH_MULTI"
	PriceKeyEVisa1Day1MonthSingle   PriceKey = "E_VISA_1_DAY_1_MONTH_SINGLE"
	PriceKeyEVisa1Day1MonthMulti    PriceKey = "E_VISA_1_DAY_1_MONTH_MULTI"
	PriceKeyEVisa1Day3MonthSingle   PriceKey = "E_VISA_1_DAY_3_MONTH_SINGLE"
	PriceKeyEVisa1Day3MonthMulti    PriceKey = "E_VISA_1_DAY_3_MONTH_MULTI"
	PriceKeyEVisaUrgent1MonthSingle PriceKey = "E_VISA_URGENT_1_MONTH_SINGLE"
	PriceKeyEVisaUrgent1MonthMulti  PriceKey = "E_VISA_URGENT_1_MONTH_MULTI"
	PriceKeyEVisaUrgent3MonthSingle PriceKey = "E_VISA_URGENT_3_MONTH_SINGLE"
	PriceKeyEVisaUrgent3MonthMulti  PriceKey = "E_VISA_URGENT_3_MONTH_MULTI"
)
const (
	PriceKeyPriority2Day1MonthSingle   PriceKey = "PRIORITY_2_DAY_1_MONTH_SINGLE"
	PriceKeyPriority2Day1MonthMulti    PriceKey = "PRIORITY_2_DAY_1_MONTH_MULTI"
	PriceKeyPriority2Day3MonthSingle   PriceKey = "PRIORITY_2_DAY_3_MONTH_SINGLE"
	PriceKeyPriority2Day3MonthMulti    PriceKey = "PRIORITY_2_DAY_3_MONTH_MULTI"
	PriceKeyPriority1Day1MonthSingle   PriceKey = "PRIORITY_1_DAY_1_MONTH_SINGLE"
	PriceKeyPriority1Day1MonthMulti    PriceKey = "PRIORITY_1_DAY_1_MONTH_MULTI"
	PriceKeyPriority1Day3MonthSingle   PriceKey = "PRIORITY_1_DAY_3_MONTH_SINGLE"
	PriceKeyPriority1Day3MonthMulti    PriceKey = "PRIORITY_1_DAY_3_MONTH_MULTI"
	PriceKeyPriorityUrgent1MonthSingle PriceKey = "PRIORITY_URGENT_1_MONTH_SINGLE"
	PriceKeyPriorityUrgent1MonthMulti  PriceKey = "PRIORITY_URGENT_1_MONTH_MULTI"
	PriceKeyPriorityUrgent3MonthSingle PriceKey = "PRIORITY_URGENT_3_MONTH_SINGLE"
	PriceKeyPriorityUrgent3MonthMulti  PriceKey = "PRIORITY_URGENT_3_MONTH_MULTI"
)
const (
	PriceKeyFastTrackNormal PriceKey = "FAST_TRACK_NORMAL"
	PriceKeyFastTrackVIP    PriceKey = "FAST_TRACK_VIP"
	PriceKeyPickupCar       PriceKey = "PICKUP_CAR"
)
const (
	PriceKeyVisaOnArrival1Day1MonthSingle PriceKey = "VISA_ON_ARRIVAL_1_DAY_1_MONTH_SINGLE"
)

type PriorityApplicant added in v2.6.0

type PriorityApplicant struct {
	PortraitFile string `bson:"portraitFile" json:"portraitFile"`
	PassportFile string `bson:"passportFile" json:"passportFile"`
	Code         string `bson:"code" json:"code"`
	Email        string `bson:"email" json:"email"`
}

type UIOrder

type UIOrder struct {
	Applicants         []Applicant         `bson:"applicants" json:"applicants"`
	PriorityApplicants []PriorityApplicant `bson:"priorityApplicants" json:"priorityApplicants"`
	Options            CartOptions         `bson:"options" json:"options"`
	Billing            CartBilling         `bson:"billing" json:"billing"`
	ApplicationType    string              `bson:"applicationType" json:"applicationType"`
}

Jump to

Keyboard shortcuts

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