Documentation
¶
Index ¶
- Variables
- type DynamoHotelHistory
- type DynamoHotelPictureRec
- type DynamoHotelRec
- type DynamoRoomAttributeRec
- type DynamoRoomRec
- type DynamoRoomTypeRec
- type DynamoSellableRec
- type Hotel
- type HotelBuilding
- type HotelBusinessObjectScope
- type HotelBusinessRule
- type HotelBusinessRuleEffect
- type HotelConfigChange
- type HotelDateRange
- type HotelFloor
- type HotelMarketing
- type HotelOptions
- type HotelPicture
- type HotelRoom
- type HotelRoomAttribute
- type HotelRoomType
- type HotelSellable
- type ResWrapper
- type RqWrapper
Constants ¶
This section is empty.
Variables ¶
View Source
var SELLABLE_INVENTORY_TYPE_PER_DAY string = "per_day"
View Source
var SELLABLE_INVENTORY_TYPE_PER_NIGHT string = "per_night"
View Source
var SELLABLE_INVENTORY_TYPE_PER_UNIT string = "per_unit"
View Source
var TAG_PRICE_UPDATE_UNIT_CURRENCY string = "currency"
View Source
var TAG_PRICE_UPDATE_UNIT_PERCENT string = "percent"
Functions ¶
This section is empty.
Types ¶
type DynamoHotelHistory ¶
type DynamoHotelHistory struct {
Code string `json:"code"` //mandatory for Dynamo db config table
ItemType string `json:"itemType"` //mandatory for dynamo db config tabble
TimeStamp string `json:"timeStamp"`
EventName string `json:"eventName"`
ObjectName string `json:"objectName"`
FieldName string `json:"fieldName"`
OldValue string `json:"oldValue"`
NewValue string `json:"newValue"`
HumanReadableComment string `json:"humanReadableComment"`
}
type DynamoHotelPictureRec ¶
type DynamoHotelPictureRec struct {
Code string `json:"code"` //mandatory for Dynamo db config table
ItemType string `json:"itemType"` //mandatory for dynamo db config tabble
//PICTURE SPECIFIC ATTRIBUTES
PictureItemCode string `json:"pictureItemCode"` //code of the business object the picture belongs to
Url string `json:"url"`
Tags string `json:"tags"`
Main bool `json:"main"`
LastUpdatedBy string `json:"lastUpdatedBy"`
}
Use for write (this avoid having indexed attribute sent in request empty (like user))
type DynamoHotelRec ¶
type DynamoHotelRec struct {
Code string `json:"code"` //mandatory for Dynamo db config table
ItemType string `json:"itemType"` //mandatory for dynamo db config tabble
Name string `json:"name"`
Description string `json:"description"`
CurrencyCode string `json:"currencyCode"`
DefaultTagLine string `json:"defaultTagLine"`
DefaultDescription string `json:"defaultDescription"`
Bookable string `json:"bookable"`
Shoppable string `json:"shoppable"`
User string `json:"user",omitempty`
LastUpdatedBy string `json:"lastUpdatedBy"`
//PICTURE SPECIFIC ATTRIBUTES
Url string `json:"url"`
Tags string `json:"tags"`
Main bool `json:"main"`
PictureItemCode string `json:"pictureItemCode"` //code of the business object the picture belongs to
//ROOM SPECIFIC ATTRIBUTES
Number int64 `json:"number"`
Type string `json:"type"`
Floor int32 `json:"floor"`
Building int32 `json:"building"`
BuildingName string `json:"buildingName"`
Attributes string `json:"attributes"`
//ROOM TYPE, TAGS AND SELLABLE
Quantity int64 `json:"quantity"`
Category string `json:"category"`
LowPrice float64 `json:"lowPrice"`
MedPrice float64 `json:"medPrice"`
HighPrice float64 `json:"highPrice"`
PriceImpact float64 `json:"priceImpact"`
PriceUpdateUnit string `json:"priceUpdateUnit"`
InventoryType string `json:"inventoryType"`
PricePerUnit float64 `json:"pricePerUnit"`
//HISTORY
TimeStamp string `json:"timeStamp"`
EventName string `json:"eventName"`
ObjectName string `json:"objectName"`
FieldName string `json:"fieldName"`
OldValue string `json:"oldValue"`
NewValue string `json:"newValue"`
HumanReadableComment string `json:"humanReadableComment"`
}
type DynamoRoomAttributeRec ¶
type DynamoRoomAttributeRec struct {
Code string `json:"code"`
ItemType string `json:"itemType"` //mandatory for dynamo db config tabble
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
PriceImpact float64 `json:"priceImpact"`
PriceUpdateUnit string `json:"priceUpdateUnit"`
LastUpdatedBy string `json:"lastUpdatedBy"`
}
type DynamoRoomRec ¶
type DynamoRoomRec struct {
Code string `json:"code"` //mandatory for Dynamo db config table
ItemType string `json:"itemType"` //mandatory for dynamo db config tabble
Number int64 `json:"number"`
Name string `json:name"`
Type string `json:"type"`
Floor int32 `json:"floor"`
Building int32 `json:"building"`
BuildingName string `json:"buildingName"`
Attributes string `json:"attributes"`
LastUpdatedBy string `json:"lastUpdatedBy"`
}
func (DynamoRoomRec) GetPk ¶
func (drr DynamoRoomRec) GetPk() string
Implementing core.Batchable interface to allow this struc to be written in batch
type DynamoRoomTypeRec ¶
type DynamoRoomTypeRec struct {
Code string `json:"code"`
ItemType string `json:"itemType"` //mandatory for dynamo db config tabble
Name string `json:"name"`
Description string `json:"description"`
LowPrice float64 `json:"lowPrice"`
MedPrice float64 `json:"medPrice"`
HighPrice float64 `json:"highPrice"`
LastUpdatedBy string `json:"lastUpdatedBy"`
}
type DynamoSellableRec ¶
type DynamoSellableRec struct {
Code string `json:"code"`
ItemType string `json:"itemType"` //mandatory for dynamo db config tabble
Category string `json:"category"`
Name string `json:"name"`
Quantity int64 `json:"quantity"`
InventoryType string `json:"inventoryType"`
PricePerUnit float64 `json:"pricePerUnit"`
Description string `json:"description"`
LastUpdatedBy string `json:"lastUpdatedBy"`
}
type Hotel ¶
type Hotel struct {
Code string `json:"code"` //mandatory for Dynamo db config table
Name string `json:"name"`
Description string `json:"description"`
CurrencyCode string `json:"currencyCode"`
DefaultMarketting HotelMarketing `json:"defaultMarketting"`
Options HotelOptions `json:"options"`
Pictures []HotelPicture `json:"pictures"`
Buildings []HotelBuilding `json:"buildings"`
RoomTypes []HotelRoomType `json:"roomTypes"`
Tags []HotelRoomAttribute `json:"tags"`
Sellables []HotelSellable `json:"sellables"`
Rules []HotelBusinessRule `json:"businessRules"`
PendingChanges []HotelConfigChange `json:"pendingChanges"` //changes made n config pending publication
}
type HotelBuilding ¶
type HotelBuilding struct {
Name string `json:"name"`
Floors []HotelFloor `json:"floors"`
}
type HotelBusinessObjectScope ¶
type HotelBusinessObjectScope struct {
Type string `json:"type"` //Room, RoomType, Attribute, Sellable
Id string `json:"id"` //unique identifier of the business object
}
Defines the scope of a business rule
type HotelBusinessRule ¶
type HotelBusinessRule struct {
Id string `json:"id"`
AppliesTo []HotelBusinessObjectScope `json:"appliesTo"`
Effect []HotelBusinessRuleEffect `json:"effect"`
On []HotelDateRange `json:"on"`
NotOn []HotelDateRange `json:"notOn"`
}
type HotelBusinessRuleEffect ¶
type HotelBusinessRuleEffect struct {
EffectType string `json:"effectType"` //availability, pricing, inventory
Available bool `json:"available"`
PriceImpact int64 `json:"priceImpact"`
PriceUpdateUnit string `json:"priceUpdateUnit"`
}
Effect of a business rule on a hotel product
type HotelConfigChange ¶
type HotelConfigChange struct {
TimeStamp string `json:"timeStamp"`
EventName string `json:"eventName"`
ObjectName string `json:"objectName"`
FieldName string `json:"fieldName"`
OldValue string `json:"oldValue"`
NewValue string `json:"newValue"`
HumanReadableComment string `json:"humanReadableComment"`
}
type HotelDateRange ¶
type HotelDateRange struct {
From string `json:"from"` //From date
To string `json:"from"` //To date
Dow []string `json:"dow"` // Day of weeks
}
definition of the time frame a rule applies
type HotelFloor ¶
type HotelMarketing ¶
type HotelOptions ¶
type HotelPicture ¶
type HotelRoom ¶
type HotelRoom struct {
Number int64 `json:"number"`
Name string `json:"name"`
Type string `json:"type"`
Attributes []HotelRoomAttribute `json:"attributes"`
}
type HotelRoomAttribute ¶
type HotelRoomType ¶
type HotelSellable ¶
type HotelSellable struct {
Code string `json:"code"`
Category string `json:"category"`
Name string `json:"name"`
Quantity int64 `json:"quantity"`
InventoryType string `json:"inventoryType"` //per_day / per_unit / per night
PricePerUnit float64 `json:"pricePerUnit"`
Description string `json:"description"`
OptionalTags []HotelRoomAttribute `json:"optionalTags"`
Pictures []HotelPicture `json:"pictures"`
}
type ResWrapper ¶
type RqWrapper ¶
type RqWrapper struct {
UserInfo core.User `json:"userInfo"`
SubFunction string `json:"subFunction"`
Id string `json:"id"` //ID to be used for GET request
Request Hotel `json:"request"`
}
Requests and Respone to deserialize teh Json Payload into. ideally this should be a generic struct in teh core package with a specialised body but the design needs more thoughts so we will include it here for the moment
Click to show internal directories.
Click to hide internal directories.