add event base intelligency
This commit is contained in:
23
models/booking/enums.go
Normal file
23
models/booking/enums.go
Normal file
@@ -0,0 +1,23 @@
|
||||
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.
|
||||
*/
|
||||
Reference in New Issue
Block a user