24 lines
811 B
Go
24 lines
811 B
Go
package booking
|
|
|
|
type BookingMode int
|
|
|
|
const (
|
|
PLANNED BookingMode = iota // predictible
|
|
PREEMPTED // can be both predictible or unpredictible, first one asking for a quick exec, second on event, but we pay to preempt in any case.
|
|
WHEN_POSSIBLE // unpredictable, two mode of payment can be available on that case: fixed, or per USE
|
|
)
|
|
|
|
/*
|
|
Ok make a point there:
|
|
There is 3 notions about booking & payment :
|
|
Booking mode : WHEN is executed
|
|
Buying mode : Duration of payment
|
|
Pricing Mode : How Many time we pay
|
|
|
|
|
|
We can simplify Buying Mode and Pricing Mode, some Buying Mode implied limited pricing mode
|
|
Such as Rules. Just like PERMANENT BUYING can be paid only once.
|
|
|
|
Booking Mode on WHEN POSSIBLE make an exception, because we can't know when executed.
|
|
*/
|