Not in catalog strategy
This commit is contained in:
@@ -152,8 +152,10 @@ func BookingEstimation(t TimePricingStrategy, price float64, locationDurationInS
|
|||||||
|
|
||||||
// may suppress in pricing strategy -> to set in map
|
// may suppress in pricing strategy -> to set in map
|
||||||
type PricingStrategy[T Strategy] struct {
|
type PricingStrategy[T Strategy] struct {
|
||||||
Price float64 `json:"price" bson:"price" default:"0"` // Price is the Price of the pricing
|
Price float64 `json:"price" bson:"price" default:"0"` // Price is the Price of the pricing
|
||||||
Currency string `json:"currency" bson:"currency" default:"USD"` // Currency is the currency of the pricing
|
Currency string `json:"currency" bson:"currency" default:"USD"` // Currency is the currency of the pricing
|
||||||
|
|
||||||
|
// NO NEED ?
|
||||||
BuyingStrategy BuyingStrategy `json:"buying_strategy" bson:"buying_strategy" default:"0"` // BuyingStrategy is the buying strategy of the pricing
|
BuyingStrategy BuyingStrategy `json:"buying_strategy" bson:"buying_strategy" default:"0"` // BuyingStrategy is the buying strategy of the pricing
|
||||||
TimePricingStrategy TimePricingStrategy `json:"time_pricing_strategy" bson:"time_pricing_strategy" default:"0"` // TimePricingStrategy is the time pricing strategy of the pricing
|
TimePricingStrategy TimePricingStrategy `json:"time_pricing_strategy" bson:"time_pricing_strategy" default:"0"` // TimePricingStrategy is the time pricing strategy of the pricing
|
||||||
OverrideStrategy T `json:"override_strategy" bson:"override_strategy" default:"-1"` // Modulation is the modulation of the pricing
|
OverrideStrategy T `json:"override_strategy" bson:"override_strategy" default:"-1"` // Modulation is the modulation of the pricing
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ const (
|
|||||||
*/
|
*/
|
||||||
type AbstractObject struct {
|
type AbstractObject struct {
|
||||||
UUID string `json:"id,omitempty" bson:"id,omitempty" validate:"required"`
|
UUID string `json:"id,omitempty" bson:"id,omitempty" validate:"required"`
|
||||||
|
NotInCatalog bool `json:"not_in_catalog" bson:"not_in_catalog" default:"false"`
|
||||||
Name string `json:"name,omitempty" bson:"name,omitempty" validate:"required"`
|
Name string `json:"name,omitempty" bson:"name,omitempty" validate:"required"`
|
||||||
IsDraft bool `json:"is_draft" bson:"is_draft" default:"false"`
|
IsDraft bool `json:"is_draft" bson:"is_draft" default:"false"`
|
||||||
CreatorID string `json:"creator_id,omitempty" bson:"creator_id,omitempty"`
|
CreatorID string `json:"creator_id,omitempty" bson:"creator_id,omitempty"`
|
||||||
@@ -47,6 +48,10 @@ func (ri *AbstractObject) GetAccessor(request *tools.APIRequest) Accessor {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *AbstractObject) IsNotInCatalog() bool {
|
||||||
|
return r.NotInCatalog
|
||||||
|
}
|
||||||
|
|
||||||
func (r *AbstractObject) Unsign() {
|
func (r *AbstractObject) Unsign() {
|
||||||
r.Signature = nil
|
r.Signature = nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ type ShallowDBObject interface {
|
|||||||
// DBObject is an interface that defines the basic methods for a DBObject
|
// DBObject is an interface that defines the basic methods for a DBObject
|
||||||
type DBObject interface {
|
type DBObject interface {
|
||||||
GenerateID()
|
GenerateID()
|
||||||
|
IsNotInCatalog()
|
||||||
SetID(id string)
|
SetID(id string)
|
||||||
GetID() string
|
GetID() string
|
||||||
GetName() string
|
GetName() string
|
||||||
|
|||||||
Reference in New Issue
Block a user