initial commit 2
This commit is contained in:
15
application/viewmodel/address.go
Normal file
15
application/viewmodel/address.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package viewmodel
|
||||
|
||||
type Address struct {
|
||||
UUID string `json:"address_uuid,omitempty"`
|
||||
InternalID string `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Address string `json:"address,omitempty"`
|
||||
AddressType string `json:"address_type,omitempty"`
|
||||
AddressTypeName string `json:"address_type_name,omitempty"`
|
||||
Latitude float64 `json:"lat,omitempty"`
|
||||
Longitude float64 `json:"lng,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
User User `json:"user,omitempty"`
|
||||
CreatedUserUUID string `json:"-"`
|
||||
}
|
||||
9
application/viewmodel/auth.go
Normal file
9
application/viewmodel/auth.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package viewmodel
|
||||
|
||||
// AuthResponse has data from authentication routes
|
||||
type AuthResponse struct {
|
||||
Token string `json:"token"`
|
||||
ValidTime int64 `json:"valid_time"`
|
||||
ServerTime int64 `json:"server_time"`
|
||||
User User `json:"user"`
|
||||
}
|
||||
55
application/viewmodel/bxe.go
Normal file
55
application/viewmodel/bxe.go
Normal file
@@ -0,0 +1,55 @@
|
||||
package viewmodel
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Eligibility struct {
|
||||
TrackingID string `json:"tracking_id,omitempty"`
|
||||
Payer Payer `json:"payer,omitempty"`
|
||||
Provider Provider `json:"provider,omitempty"`
|
||||
Subscriber Subscriber `json:"subscriber,omitempty"`
|
||||
ServiceInfo ServiceInfo `json:"service_info,omitempty"`
|
||||
}
|
||||
|
||||
type Payer struct {
|
||||
PayerID string `json:"payer_id,omitempty"`
|
||||
PayerName string `json:"payer_name,omitempty"`
|
||||
}
|
||||
|
||||
type Provider struct {
|
||||
ProviderID string `json:"provider_id,omitempty"`
|
||||
ProviderNPI string `json:"provider_npi,omitempty"`
|
||||
ProviderName string `json:"provider_name,omitempty"`
|
||||
Name Name `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
type Name struct {
|
||||
First string `json:"first,omitempty"`
|
||||
Last string `json:"last,omitempty"`
|
||||
Middle string `json:"middle,omitempty"`
|
||||
}
|
||||
|
||||
type Subscriber struct {
|
||||
PatientType string `json:"patient_type,omitempty"`
|
||||
SubscriberID string `json:"subscriber_id,omitempty"`
|
||||
Name Name `json:"name,omitempty"`
|
||||
DemographicInfo DemographicInfo `json:"demographic_info,omitempty"`
|
||||
Dependents []Dependent `json:"dependents,omitempty"`
|
||||
}
|
||||
|
||||
type DemographicInfo struct {
|
||||
DateOfBirth time.Time `json:"date_of_birth,omitempty"`
|
||||
Gender string `json:"gender,omitempty"`
|
||||
}
|
||||
|
||||
type Dependent struct {
|
||||
PatientAccountNumber string `json:"patient_account_number,omitempty"`
|
||||
Name Name `json:"name,omitempty"`
|
||||
DemographicInfo DemographicInfo `json:"demographic_info,omitempty"`
|
||||
}
|
||||
|
||||
type ServiceInfo struct {
|
||||
DateOfService time.Time `json:"date_of_service,omitempty"`
|
||||
ServiceTypeCodes []string `json:"service_type_codes,omitempty"`
|
||||
}
|
||||
34
application/viewmodel/notification.go
Normal file
34
application/viewmodel/notification.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package viewmodel
|
||||
|
||||
import "time"
|
||||
|
||||
type Notification struct {
|
||||
UUID string `json:"uuid"`
|
||||
To string `json:"to"`
|
||||
From string `json:"from"`
|
||||
Type string `json:"type"`
|
||||
Subject string `json:"subject"`
|
||||
Message string `json:"message"`
|
||||
Ride Ride `json:"ride"`
|
||||
User User `json:"user"`
|
||||
CreatedUser User `json:"created_user"`
|
||||
Created time.Time `json:"create_at"`
|
||||
MessageType string `json:"message_type"`
|
||||
Read bool `json:"read"`
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
DeliveryID string `json:"id"`
|
||||
NotificationID string `json:"nid"`
|
||||
CreateDate time.Time `json:"date"`
|
||||
Read bool `json:"readed"`
|
||||
Content MessageContent `json:"content"`
|
||||
}
|
||||
|
||||
type MessageContent struct {
|
||||
Type string `json:"type"`
|
||||
Subject string `json:"subject"`
|
||||
Content string `json:"body,omitempty"`
|
||||
Payload interface{} `json:"payload,omitempty"`
|
||||
RedirectLink string `json:"redirect,omitempty"`
|
||||
}
|
||||
69
application/viewmodel/organization.go
Normal file
69
application/viewmodel/organization.go
Normal file
@@ -0,0 +1,69 @@
|
||||
package viewmodel
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type OrganizationType struct {
|
||||
ID int64 `json:"-"`
|
||||
Name string `json:"name"`
|
||||
Key string `json:"key"`
|
||||
Description string `json:"desc,omitempty"`
|
||||
Created time.Time `json:"-"`
|
||||
Updated time.Time `json:"-"`
|
||||
}
|
||||
|
||||
type Organization struct {
|
||||
ID int64 `json:"-"`
|
||||
UUID string `json:"id"`
|
||||
Type OrganizationType `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"desc,omitempty"`
|
||||
ReferenceID int64 `json:"-"`
|
||||
ParentID int64 `json:"-"`
|
||||
Main bool `json:"main"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
Active bool `json:"active"`
|
||||
Blocked bool `json:"blocked"`
|
||||
Suspended bool `json:"suspended"`
|
||||
Author User `json:"author"`
|
||||
LastEditor User `json:"last_editor"`
|
||||
Contacts []OrganizationContact `json:"contacts"`
|
||||
Addresses []OrganizationAddress `json:"addresses"`
|
||||
ChildOrgs []Organization `json:"childs,omitempty"`
|
||||
Parent *Organization `json:"parent,omitempty"`
|
||||
Reference interface{} `json:"reference,omitempty"`
|
||||
}
|
||||
|
||||
type OrganizationContact struct {
|
||||
ID int64 `json:"-"`
|
||||
UUID string `json:"id"`
|
||||
Organization *Organization `json:"organization,omitempty"`
|
||||
Type ContactType `json:"type"`
|
||||
Contact string `json:"contact"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"desc"`
|
||||
Created time.Time `json:"created"`
|
||||
CreatedUser User `json:"author"`
|
||||
Updated time.Time `json:"updated"`
|
||||
UpdatedUser User `json:"last_editor"`
|
||||
Active bool `json:"active"`
|
||||
}
|
||||
|
||||
type OrganizationAddress struct {
|
||||
ID int64 `json:"-"`
|
||||
UUID string `json:"id"`
|
||||
Organization *Organization `json:"organization,omitempty"`
|
||||
InternalID string `json:"internal_id"`
|
||||
Name string `json:"name"`
|
||||
Address string `json:"address"`
|
||||
Description string `json:"desc"`
|
||||
Latitude float64 `json:"lat"`
|
||||
Longitude float64 `json:"long"`
|
||||
Created time.Time `json:"created"`
|
||||
CreatedUser User `json:"author"`
|
||||
Updated time.Time `json:"updated"`
|
||||
UpdatedUser User `json:"last_editor"`
|
||||
Active bool `json:"active"`
|
||||
}
|
||||
15
application/viewmodel/pagination.go
Normal file
15
application/viewmodel/pagination.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package viewmodel
|
||||
|
||||
// ReturnPagination holds the pagination data result
|
||||
type ReturnPagination struct {
|
||||
TotalRecords int64 `json:"total_records"`
|
||||
RecordsPerPage int64 `json:"records_per_page"`
|
||||
TotalPages int64 `json:"total_pages"`
|
||||
CurrentPage int64 `json:"current_page"`
|
||||
}
|
||||
|
||||
// PaginatedResult is the standard paginated list result
|
||||
type PaginatedResult struct {
|
||||
Pagination ReturnPagination `json:"pagination,omitempty"`
|
||||
List interface{} `json:"data,omitempty"`
|
||||
}
|
||||
17
application/viewmodel/profile.go
Normal file
17
application/viewmodel/profile.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package viewmodel
|
||||
|
||||
import "time"
|
||||
|
||||
type Profile struct {
|
||||
ID int64 `json:"-"`
|
||||
Name string `json:"name"`
|
||||
Key string `json:"key"`
|
||||
Description string `json:"desc"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
Active bool `json:"active"`
|
||||
Blocked bool `json:"blocked"`
|
||||
Suspended bool `json:"suspended"`
|
||||
Visible bool `json:"visible"`
|
||||
Organization Organization `json:"organization"`
|
||||
}
|
||||
119
application/viewmodel/provider.go
Normal file
119
application/viewmodel/provider.go
Normal file
@@ -0,0 +1,119 @@
|
||||
package viewmodel
|
||||
|
||||
type ProviderResp struct {
|
||||
ProviderUUID string `json:"provider_uuid,omitempty"`
|
||||
InternalID string `json:"internal_id,omitempty"`
|
||||
InternalSuffixID string `json:"internal_suffix_id,omitempty"`
|
||||
MukID string `json:"muk_id,omitempty"`
|
||||
OrganizatioName string `json:"org_name,omitempty"`
|
||||
Gender string `json:"gender,omitempty"`
|
||||
AcceptNewPatients string `json:"accept_new_patients,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
FirstName string `json:"first,omitempty"`
|
||||
MiddleName string `json:"middle,omitempty"`
|
||||
LastName string `json:"last,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Keys []ProviderKey `json:"keys,omitempty"`
|
||||
Address ProviderAddress `json:"address,omitempty"`
|
||||
Distance float64 `json:"distance,omitempty"`
|
||||
}
|
||||
|
||||
type ProviderKey struct {
|
||||
InternalID string `json:"internal_id"`
|
||||
InternalSuffixID string `json:"internal_suffix_id"`
|
||||
LocationSeqNumber string `json:"location_seq_number"`
|
||||
PlanCode string `json:"plan_code"`
|
||||
ProductID string `json:"product_id"`
|
||||
TreatmentCategoryCode string `json:"treatment_category_code"`
|
||||
}
|
||||
|
||||
type ProviderAddress struct {
|
||||
StreetAddress1 string `json:"street_address_1,omitempty"`
|
||||
StreetAddress2 string `json:"street_address_2,omitempty"`
|
||||
CityName string `json:"city,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
ZipCode string `json:"zipcode,omitempty"`
|
||||
Country string `json:"country,omitempty"`
|
||||
Latitude float64 `json:"lat,omitempty"`
|
||||
Longitude float64 `json:"long,omitempty"`
|
||||
PhoneNumber string `json:"phone_number,omitempty"`
|
||||
}
|
||||
|
||||
// ProviderSearchParams entity data
|
||||
type ProviderSearchParams struct {
|
||||
Name string
|
||||
SearchBy string
|
||||
Latitude float64
|
||||
Longitude float64
|
||||
Distance int64
|
||||
Limit int64
|
||||
}
|
||||
|
||||
type ProviderResponse struct {
|
||||
MukID string `json:"mukId"`
|
||||
FivePartKeyGroups []PartKeyGroup `json:"fivePartKeyGroups"`
|
||||
OrgName string `json:"orgName"`
|
||||
Gender string `json:"gender"`
|
||||
AcceptNewPatients string `json:"acceptNewPatients"`
|
||||
ProviderName string `json:"providerName"`
|
||||
FirstName string `json:"firstName"`
|
||||
LastName string `json:"lastName"`
|
||||
MiddleName string `json:"middleName"`
|
||||
ProviderTitle string `json:"providerTitle"`
|
||||
StreetName1 string `json:"streetName_1"`
|
||||
StreetName2 string `json:"streetName_2"`
|
||||
CityName string `json:"cityName"`
|
||||
State string `json:"state"`
|
||||
ZipCode string `json:"zipCode"`
|
||||
Country string `json:"country"`
|
||||
Latitude string `json:"latitude"`
|
||||
Longitude string `json:"longitude"`
|
||||
PhoneNumber string `json:"phoneNumber"`
|
||||
ProviderEntityName string `json:"providerEntityName"`
|
||||
ProviderEntityCode string `json:"providerEntityCode"`
|
||||
ProviderTypeCode []ProviderTypeCode `json:"providerTypeCode"`
|
||||
Distance string `json:"distance"`
|
||||
AvailabilityOfCost string `json:"availabilityOfCost"`
|
||||
TDDPhoneNumber string `json:"tddPhoneNumber"`
|
||||
ExtendedOfficeHours string `json:"extendedOfficeHours"`
|
||||
ProviderCountyCode string `json:"providerCountyCode"`
|
||||
ProviderCountyName string `json:"providerCountyName"`
|
||||
HospitalAffiliationNames []HospitalAffiliationNames `json:"hospitalAffiliationNames"`
|
||||
ProviderAffiliationNumber string `json:"providerAffiliationNumber"`
|
||||
ProviderAffiliationName string `json:"providerAffiliationName"`
|
||||
LanguagesSpoken []Languages `json:"languagesSpoken"`
|
||||
OfficeLanguagesSpoken []Languages `json:"officeLanguagesSpoken"`
|
||||
MedSchool string `json:"medSchool"`
|
||||
MedSchoolYear string `json:"medSchoolYear"`
|
||||
Internship string `json:"internship"`
|
||||
Residence string `json:"residency"`
|
||||
Specialty1 string `json:"specialty1"`
|
||||
Specialty2 string `json:"specialty2"`
|
||||
Specialty3 string `json:"specialty3"`
|
||||
Specialty4 string `json:"specialty4"`
|
||||
Certification1 string `json:"certification1"`
|
||||
Certification2 string `json:"certification2"`
|
||||
Certification3 string `json:"certification3"`
|
||||
Certification4 string `json:"certification4"`
|
||||
}
|
||||
|
||||
type HospitalAffiliationNames struct {
|
||||
HospAffProvOrgName string `json:"hospAffProvOrgName"`
|
||||
}
|
||||
|
||||
type Languages struct {
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
type ProviderTypeCode struct {
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
type PartKeyGroup struct {
|
||||
ProviderNum string `json:"providerNum"`
|
||||
ProviderNumSuffix string `json:"providerNumSuffix"`
|
||||
LocationSeqNum string `json:"locationSeqNum"`
|
||||
PlanCode string `json:"planCode"`
|
||||
ProductID string `json:"productId"`
|
||||
TreatmentCategoryCode string `json:"treatmentCategoryCode"`
|
||||
}
|
||||
161
application/viewmodel/tnc.go
Normal file
161
application/viewmodel/tnc.go
Normal file
@@ -0,0 +1,161 @@
|
||||
package viewmodel
|
||||
|
||||
import "time"
|
||||
|
||||
//WebhookResponse has the data and events from the webhook
|
||||
type WebhookResponse struct {
|
||||
EventID string `json:"event_id,omitempty"`
|
||||
HREF string `json:"href,omitempty"`
|
||||
OccurredAt string `json:"occurred_at,omitempty"`
|
||||
EventType string `json:"event_type,omitempty"`
|
||||
Event RideRequest `json:"event,omitempty"`
|
||||
Ride Ride `json:"-"`
|
||||
}
|
||||
|
||||
//RideRequest has the data to dispatch a ride
|
||||
type RideRequest struct {
|
||||
UserUUID string `json:"user_uuid,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
RideID string `json:"ride_id,omitempty"`
|
||||
RideType string `json:"ride_type,omitempty"`
|
||||
Origin Location `json:"origin,omitempty"`
|
||||
Location Location `json:"location,omitempty"`
|
||||
Destination Location `json:"destination,omitempty"`
|
||||
Passenger UserLyft `json:"passenger,omitempty"`
|
||||
Notes string `json:"external_note,omitempty"`
|
||||
RouteURL string `json:"route_url,omitempty"`
|
||||
ScheduledPickupRange interface{} `json:"scheduled_pickup_range,omitempty"`
|
||||
PrimetimePercentage string `json:"primetime_percentage,omitempty"`
|
||||
Pickup Location `json:"pickup,omitempty"`
|
||||
DropOff Location `json:"dropoff,omitempty"`
|
||||
Vehicle Vehicle `json:"vehicle,omitempty"`
|
||||
Price Price `json:"price,omitempty"`
|
||||
Driver UserLyft `json:"driver,omitempty"`
|
||||
GeneratedAtMS *int64 `json:"generated_at_ms,omitempty"`
|
||||
GeneratedAt *time.Time `json:"generated_at,omitempty"`
|
||||
RequestAtMS *int64 `json:"requested_at_ms,omitempty"`
|
||||
RequestAt *time.Time `json:"requested_at,omitempty"`
|
||||
LineItems []Price `json:"line_items,omitempty"`
|
||||
BeaconColor string `json:"beacon_color,omitempty"`
|
||||
Charges []Charge `json:"charges,omitempty"`
|
||||
VisitDate *time.Time `json:"visit_date,omitempty"`
|
||||
VisitTime *time.Time `json:"visit_time,omitempty"`
|
||||
PickupTime *time.Time `json:"pickup_time,omitempty"`
|
||||
ReturnTime *time.Time `json:"return_time,omitempty"`
|
||||
Distance float64 `json:"distance,omitempty"`
|
||||
ETA int64 `json:"eta,omitempty"`
|
||||
Duration int64 `json:"duration,omitempty"`
|
||||
Visit Visit `json:"visit,omitempty"`
|
||||
CreateUserUUID string `json:"created_user_uuid,omitempty"`
|
||||
VisitExternalID string `json:"visit_external_id,omitempty"`
|
||||
CanCancel []string `json:"can_cancel,omitempty"`
|
||||
PricingDetailsURL string `json:"pricing_details_url,omitempty"`
|
||||
RideProfile string `json:"ride_profile,omitempty"`
|
||||
DistanceInMiles float64 `json:"distance_miles,omitempty"`
|
||||
DurationInSeconds float64 `json:"duration_seconds,omitempty"`
|
||||
CanceledBy string `json:"canceled_by,omitempty"`
|
||||
TripType TripType `json:"trip_type,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
ErrorDescription string `json:"error_description,omitempty"`
|
||||
}
|
||||
|
||||
//Charge information
|
||||
type Charge struct {
|
||||
Currency string `json:"currency,omitempty"`
|
||||
PaymentMethod string `json:"payment_method,omitempty"`
|
||||
Amount int64 `json:"amount,omitempty"`
|
||||
}
|
||||
|
||||
//Price information
|
||||
type Price struct {
|
||||
Currency string `json:"currency,omitempty"`
|
||||
Amount float64 `json:"amount,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
//Vehicle information
|
||||
type Vehicle struct {
|
||||
Color string `json:"color,omitempty"`
|
||||
Make string `json:"make,omitempty"`
|
||||
LicensePlate string `json:"license_plate,omitempty"`
|
||||
ImageURL string `json:"image_url,omitempty"`
|
||||
Year int64 `json:"year,omitempty"`
|
||||
LicensePlateState string `json:"license_plate_state,omitempty"`
|
||||
Model string `json:"model,omitempty"`
|
||||
}
|
||||
|
||||
//Location has the coordinates from the user
|
||||
type Location struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Latitude float64 `json:"lat,omitempty"`
|
||||
Longitude float64 `json:"lng,omitempty"`
|
||||
Address string `json:"address,omitempty"`
|
||||
ETASeconds *int64 `json:"eta_seconds,omitempty"`
|
||||
TimeMS *int64 `json:"time_ms,omitempty"`
|
||||
Time *time.Time `json:"time,omitempty"`
|
||||
Bearing *float64 `json:"bearing,omitempty"`
|
||||
}
|
||||
|
||||
//UserLyft has the personal information
|
||||
type UserLyft struct {
|
||||
UserID *string `json:"user_id,omitempty"`
|
||||
Rating *string `json:"rating,omitempty"`
|
||||
ImageURL *string `json:"image_url,omitempty"`
|
||||
FirstName string `json:"first_name,omitempty"`
|
||||
LastName string `json:"last_name,omitempty"`
|
||||
PhoneNumber string `json:"phone_number,omitempty"`
|
||||
}
|
||||
|
||||
// Ride entity data
|
||||
type Ride struct {
|
||||
UUID string `json:"ride_uuid,omitempty"`
|
||||
InternalID string `json:"internal_id,omitempty"`
|
||||
User User `json:"user,omitempty"`
|
||||
Status RideStatus `json:"status,omitempty"`
|
||||
Type RideType `json:"type,omitempty"`
|
||||
Note string `json:"notes,omitempty"`
|
||||
Passenger UserLyft `json:"passenger,omitempty"`
|
||||
Driver UserLyft `json:"driver,omitempty"`
|
||||
Vehicle Vehicle `json:"vehicle,omitempty"`
|
||||
Route RideRoute `json:"route,omitempty"`
|
||||
VisitDate *time.Time `json:"visit_date,omitempty"`
|
||||
VisitTime *time.Time `json:"visit_time,omitempty"`
|
||||
PickupTime *time.Time `json:"pickup_time,omitempty"`
|
||||
Visit Visit `json:"visit,omitempty"`
|
||||
CreatedUser User `json:"created_user,omitempty"`
|
||||
CreateAt time.Time `json:"create_at,omitempty"`
|
||||
UpdateAt time.Time `json:"update_at,omitempty"`
|
||||
TripType TripType `json:"trip_type,omitempty"`
|
||||
}
|
||||
|
||||
// RideStatus entity data
|
||||
type RideStatus struct {
|
||||
Key string `json:"key,omitempty"`
|
||||
Value string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// TripType entity data
|
||||
type TripType struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// RideType entity data
|
||||
type RideType struct {
|
||||
Key string `json:"key,omitempty"`
|
||||
Value string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// RideRoute entity data
|
||||
type RideRoute struct {
|
||||
Origin Location `json:"origin,omitempty"`
|
||||
Destination Location `json:"destination,omitempty"`
|
||||
Location Location `json:"location,omitempty"`
|
||||
RouteKML *string `json:"route_kml,omitempty"`
|
||||
Distance float64 `json:"distance,omitempty"`
|
||||
Duration int64 `json:"duration,omitempty"`
|
||||
ETA int64 `json:"eta,omitempty"`
|
||||
Bearing int64 `json:"bearing,omitempty"`
|
||||
}
|
||||
87
application/viewmodel/twillio.go
Normal file
87
application/viewmodel/twillio.go
Normal file
@@ -0,0 +1,87 @@
|
||||
package viewmodel
|
||||
|
||||
type ListNumbers struct {
|
||||
AvailableNumbers []Number `json:"available_phone_numbers,omitempty"`
|
||||
Page int64 `json:"page,omitempty"`
|
||||
PageSize int64 `json:"page_size,omitempty"`
|
||||
URI string `json:"uri,omitempty"`
|
||||
FirstPageURI string `json:"first_page_uri,omitempty"`
|
||||
PreviousPageURI string `json:"previous_page_uri,omitempty"`
|
||||
NextPageURI string `json:"next_page_uri,omitempty"`
|
||||
IncomingPhones []Number `json:"incoming_phone_numbers,omitempty"`
|
||||
}
|
||||
|
||||
type Number struct {
|
||||
SID *string `json:"sid,omitempty"`
|
||||
AccountSID *string `json:"account_sid,omitempty"`
|
||||
FriendlyName string `json:"friendly_name,omitempty"`
|
||||
PhoneNumber string `json:"phone_number,omitempty"`
|
||||
Lata string `json:"lata,omitempty"`
|
||||
RateCenter string `json:"rate_center,omitempty"`
|
||||
Latitude string `json:"latitude,omitempty"`
|
||||
Longitude string `json:"longitude,omitempty"`
|
||||
Region string `json:"region,omitempty"`
|
||||
PostalCode string `json:"postal_code,omitempty"`
|
||||
ISOCountry string `json:"iso_country,omitempty"`
|
||||
Beta bool `json:"beta,omitempty"`
|
||||
Capabilities Capabilities `json:"capabilities,omitempty"`
|
||||
VoiceURL *string `json:"voice_url,omitempty"`
|
||||
VoiceMethod *string `json:"voice_method,omitempty"`
|
||||
VoiceFallbackURL *string `json:"voice_fallback_url,omitempty"`
|
||||
VoiceFallbackMethod *string `json:"voice_fallback_method,omitempty"`
|
||||
VoiceCallerIDLookup bool `json:"voice_caller_id_lookup,omitempty"`
|
||||
VoiceApplicationSID *string `json:"voice_application_sid,omitempty"`
|
||||
DateCreated *string `json:"date_created,omitempty"`
|
||||
DateUpdated *string `json:"date_updated,omitempty"`
|
||||
SmsURL *string `json:"sms_url,omitempty"`
|
||||
SmsMethod *string `json:"sms_method,omitempty"`
|
||||
SmsFallbackURL *string `json:"sms_fallback_url,omitempty"`
|
||||
SmsFallbackMethod *string `json:"sms_fallback_method,omitempty"`
|
||||
SmsApplicationID *string `json:"sms_application_sid,omitempty"`
|
||||
StatusCallback *string `json:"status_callback,omitempty"`
|
||||
StatusCallbackMethod *string `json:"status_callback_method,omitempty"`
|
||||
APIVersion *string `json:"api_version,omitempty"`
|
||||
}
|
||||
|
||||
type Capabilities struct {
|
||||
Voice bool `json:"voice,omitempty"`
|
||||
SMS bool `json:"SMS,omitempty"`
|
||||
MMS bool `json:"MMS,omitempty"`
|
||||
}
|
||||
|
||||
type ProxyNumber struct {
|
||||
From string `json:"from,omitempty"`
|
||||
To string `json:"to,omitempty"`
|
||||
Proxy string `json:"proxy,omitempty"`
|
||||
Number Number `json:"details,omitempty"`
|
||||
}
|
||||
|
||||
type SocketMessage struct {
|
||||
From string `json:"from"`
|
||||
To string `json:"to"`
|
||||
Message string `json:"message"`
|
||||
Filled bool `json:"-"`
|
||||
}
|
||||
|
||||
type TwilioWebhook struct {
|
||||
ToCountry string `json:"ToCountry,omitempty"`
|
||||
ToState string `json:"ToState,omitempty"`
|
||||
SMSMessageSID string `json:"SmsMessageSid,omitempty"`
|
||||
NumMedia string `json:"NumMedia,omitempty"`
|
||||
ToCity string `json:"ToCity,omitempty"`
|
||||
FromZip string `json:"FromZip,omitempty"`
|
||||
SMSSID string `json:"SmsSid,omitempty"`
|
||||
FromState string `json:"FromState,omitempty"`
|
||||
SMSStatus string `json:"SmsStatus,omitempty"`
|
||||
FromCity string `json:"FromCity,omitempty"`
|
||||
Body string `json:"Body,omitempty"`
|
||||
FromCountry string `json:"FromCountry,omitempty"`
|
||||
To string `json:"To,omitempty"`
|
||||
ToZip string `json:"ToZip,omitempty"`
|
||||
AddOns string `json:"AddOns,omitempty"`
|
||||
NumSegments string `json:"NumSegments,omitempty"`
|
||||
MessageSID string `json:"MessageSid,omitempty"`
|
||||
AccountSID string `json:"AccountSid,omitempty"`
|
||||
From string `json:"From,omitempty"`
|
||||
APIVersion string `json:"ApiVersion,omitempty"`
|
||||
}
|
||||
36
application/viewmodel/user.go
Normal file
36
application/viewmodel/user.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package viewmodel
|
||||
|
||||
import "time"
|
||||
|
||||
// User model for API binding
|
||||
type User struct {
|
||||
ID string `json:"useruuid"`
|
||||
Name string `json:"name,omitempty"`
|
||||
First string `json:"first,omitempty"`
|
||||
Last string `json:"last,omitempty"`
|
||||
Gender *string `json:"gender,omitempty"`
|
||||
Member *string `json:"member,omitempty"`
|
||||
BirthDate *time.Time `json:"birthdate,omitempty"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
PhoneNumber *string `json:"phonenumber,omitempty"`
|
||||
Pass string `json:"pass,omitempty"`
|
||||
Active bool `json:"active,omitempty"`
|
||||
Created time.Time `json:"created,omitempty"`
|
||||
Updated time.Time `json:"updated,omitempty"`
|
||||
Contacts []Contact `json:"contacts,omitempty"`
|
||||
Rides []Ride `json:"rides,omitempty"`
|
||||
Addresses []Address `json:"addresses,omitempty"`
|
||||
Profiles []Profile `json:"profiles,omitempty"`
|
||||
Types []OrganizationType `json:"types,omitempty"`
|
||||
Organizations []Organization `json:"organizations,omitempty"`
|
||||
}
|
||||
|
||||
type Contact struct {
|
||||
Type ContactType `json:"type,omitempty"`
|
||||
Value string `json:"contact,omitempty"`
|
||||
}
|
||||
|
||||
type ContactType struct {
|
||||
Key string `json:"key,omitempty"`
|
||||
Value string `json:"value,omitempty"`
|
||||
}
|
||||
33
application/viewmodel/visit.go
Normal file
33
application/viewmodel/visit.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package viewmodel
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// VisitStatus entity data
|
||||
type VisitStatus struct {
|
||||
Key string `json:"key,omitempty"`
|
||||
Value string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// Visit entity data
|
||||
type Visit struct {
|
||||
UUID string `json:"visit_uuid,omitempty"`
|
||||
Status VisitStatus `json:"visit_status,omitempty"`
|
||||
User User `json:"user,omitempty"`
|
||||
VisitDatetime time.Time `json:"visit_datetime,omitempty"`
|
||||
VisitDuration int64 `json:"visit_duration,omitempty"`
|
||||
PickupDatetime time.Time `json:"pickup_datetime,omitempty"`
|
||||
Notes *string `json:"notes,omitempty"`
|
||||
PickupAddressID int64 `json:"pickup_address_id,omitempty"`
|
||||
DestinationAddressID int64 `json:"destination_address_id,omitempty"`
|
||||
Pickup Location `json:"pickup,omitempty"`
|
||||
Provider ProviderResp `json:"provider,omitempty"`
|
||||
CreatedUser User `json:"created_user,omitempty"`
|
||||
CreatedDate time.Time `json:"created,omitempty"`
|
||||
UpdatedDate time.Time `json:"updated,omitempty"`
|
||||
ReturnDate *time.Time `json:"return_date,omitempty"`
|
||||
TripType TripType `json:"trip_type,omitempty"`
|
||||
ExternalID string `json:"visit_external_id,omitempty"`
|
||||
Rides []Ride `json:"rides,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user