mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-06 02:36:49 +00:00
83 lines
1.8 KiB
Go
83 lines
1.8 KiB
Go
package config
|
|
|
|
import "os"
|
|
|
|
type Host struct {
|
|
Items map[string]HostItem
|
|
Name string
|
|
Address string
|
|
City string
|
|
ZipCode string
|
|
PhoneNumber string
|
|
Email string
|
|
InvoicePrefix string
|
|
PaymentMethods []PaymentMethod
|
|
Platforms []Platform
|
|
CustomerSeed int
|
|
}
|
|
|
|
type HostItem struct {
|
|
Name string
|
|
CalendarId string
|
|
// Price is the daily price in EUR
|
|
Price float64
|
|
// If true, the item will be added to the calendar
|
|
MustSyncCalendar bool
|
|
HasEndDate bool
|
|
// Amount of taxes in EUR. If not zero, a tax item will be added to the invoice
|
|
Taxes float64
|
|
}
|
|
|
|
func NewHost() *Host {
|
|
return &Host{
|
|
Name: "VillaFleurie",
|
|
Address: "4 rue Gerty Archimede",
|
|
City: "Le Gosier",
|
|
ZipCode: "97190",
|
|
PhoneNumber: "+590 690 44 15 30",
|
|
Email: "location.villafleurie@gmail.com",
|
|
CustomerSeed: 239,
|
|
InvoicePrefix: "VFNI",
|
|
PaymentMethods: []PaymentMethod{"Card", "Cash", "Cheque", "Transfer"}, // TODO: add to DB
|
|
Platforms: []Platform{"Booking", "AirBnb", "TripAdvisor", "Other"}, // TODO: add to DB
|
|
Items: map[string]HostItem{ // TODO: move to DB
|
|
"T2": {
|
|
Name: "T2",
|
|
Price: 59.0,
|
|
CalendarId: os.Getenv("CALENDAR_ID_T2"),
|
|
MustSyncCalendar: true,
|
|
HasEndDate: true,
|
|
Taxes: 1.5,
|
|
},
|
|
|
|
"T3": {
|
|
Name: "T3",
|
|
Price: 80.0,
|
|
CalendarId: os.Getenv("CALENDAR_ID_T3"),
|
|
MustSyncCalendar: true,
|
|
HasEndDate: true,
|
|
Taxes: 1.5,
|
|
},
|
|
|
|
"Airport": {
|
|
Name: "Airport",
|
|
Price: 25.0,
|
|
},
|
|
|
|
"Port": {
|
|
Name: "Port",
|
|
Price: 20.0,
|
|
},
|
|
|
|
"Transport": {
|
|
Name: "Transport",
|
|
Price: 20.0,
|
|
},
|
|
|
|
"LuggageStorage": {
|
|
Name: "LuggageStorage",
|
|
Price: 30.0,
|
|
},
|
|
},
|
|
}
|
|
}
|