events

package
v0.0.0-...-add38de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOpportunityCreateEvent

func NewOpportunityCreateEvent(aggregate eventstore.Aggregate, dataFields model.OpportunityDataFields, source commonmodel.Source, externalSystem commonmodel.ExternalSystem, createdAt, updatedAt time.Time) (eventstore.Event, error)

func NewOpportunityUpdateEvent

func NewOpportunityUpdateEvent(aggregate eventstore.Aggregate, dataFields model.OpportunityDataFields, source, appSource string, externalSystem commonmodel.ExternalSystem, updatedAt time.Time, fieldsMask []string) (eventstore.Event, error)

func NewOpportunityUpdateRenewalEvent

func NewOpportunityUpdateRenewalEvent(aggregate eventstore.Aggregate, renewalLikelihood, comments, updatedByUserId, source string, amount float64, renewalApproved bool, updatedAt time.Time, fieldsMask []string, ownerUserId string, renewedAt *time.Time, adjustedRate int64) (eventstore.Event, error)

Types

type OpportunityCreateEvent

type OpportunityCreateEvent struct {
	Tenant            string                     `json:"tenant" validate:"required"`
	Name              string                     `json:"name"`
	MaxAmount         float64                    `json:"maxAmount"`
	InternalType      string                     `json:"internalType"`
	ExternalType      string                     `json:"externalType"`
	InternalStage     string                     `json:"internalStage"`
	ExternalStage     string                     `json:"externalStage"`
	EstimatedClosedAt *time.Time                 `json:"estimatedClosedAt,omitempty"`
	OwnerUserId       string                     `json:"ownerUserId"`
	CreatedByUserId   string                     `json:"createdByUserId"`
	CreatedAt         time.Time                  `json:"createdAt"`
	UpdatedAt         time.Time                  `json:"updatedAt"`
	Source            commonmodel.Source         `json:"source"`
	ExternalSystem    commonmodel.ExternalSystem `json:"externalSystem,omitempty"`
	OrganizationId    string                     `json:"organizationId" validate:"required"`
	GeneralNotes      string                     `json:"generalNotes"`
	NextSteps         string                     `json:"nextSteps"`
	Currency          string                     `json:"currency"`
	LikelihoodRate    int64                      `json:"likelihoodRate"`
}

type OpportunityUpdateEvent

type OpportunityUpdateEvent struct {
	Tenant            string                     `json:"tenant" validate:"required"`
	Name              string                     `json:"name"`
	Amount            float64                    `json:"amount"`
	MaxAmount         float64                    `json:"maxAmount"`
	UpdatedAt         time.Time                  `json:"updatedAt"`
	OwnerUserId       string                     `json:"ownerUserId"`
	InternalStage     string                     `json:"internalStage"`
	Source            string                     `json:"source"`
	AppSource         string                     `json:"appSource"`
	ExternalSystem    commonmodel.ExternalSystem `json:"externalSystem,omitempty"`
	ExternalStage     string                     `json:"externalStage"`
	ExternalType      string                     `json:"externalType"`
	EstimatedClosedAt *time.Time                 `json:"estimatedClosedAt,omitempty"`
	FieldsMask        []string                   `json:"fieldsMask"`
	Currency          string                     `json:"currency"`
	NextSteps         string                     `json:"nextSteps"`
	LikelihoodRate    int64                      `json:"likelihoodRate"`
}

func (OpportunityUpdateEvent) UpdateAmount

func (e OpportunityUpdateEvent) UpdateAmount() bool

func (OpportunityUpdateEvent) UpdateCurrency

func (e OpportunityUpdateEvent) UpdateCurrency() bool

func (OpportunityUpdateEvent) UpdateEstimatedClosedAt

func (e OpportunityUpdateEvent) UpdateEstimatedClosedAt() bool

func (OpportunityUpdateEvent) UpdateExternalStage

func (e OpportunityUpdateEvent) UpdateExternalStage() bool

func (OpportunityUpdateEvent) UpdateExternalType

func (e OpportunityUpdateEvent) UpdateExternalType() bool

func (OpportunityUpdateEvent) UpdateInternalStage

func (e OpportunityUpdateEvent) UpdateInternalStage() bool

func (OpportunityUpdateEvent) UpdateLikelihoodRate

func (e OpportunityUpdateEvent) UpdateLikelihoodRate() bool

func (OpportunityUpdateEvent) UpdateMaxAmount

func (e OpportunityUpdateEvent) UpdateMaxAmount() bool

func (OpportunityUpdateEvent) UpdateName

func (e OpportunityUpdateEvent) UpdateName() bool

func (OpportunityUpdateEvent) UpdateNextSteps

func (e OpportunityUpdateEvent) UpdateNextSteps() bool

func (OpportunityUpdateEvent) UpdateOwnerUserId

func (e OpportunityUpdateEvent) UpdateOwnerUserId() bool

type OpportunityUpdateRenewalEvent

type OpportunityUpdateRenewalEvent struct {
	Tenant              string     `json:"tenant" validate:"required"`
	UpdatedAt           time.Time  `json:"updatedAt"`
	UpdatedByUserId     string     `json:"updatedByUserId"`
	RenewalLikelihood   string     `json:"renewalLikelihood" validate:"required" enums:"HIGH,MEDIUM,LOW,ZERO"`
	RenewalApproved     bool       `json:"renewalApproved,omitempty"`
	Comments            string     `json:"comments"`
	Amount              float64    `json:"amount"`
	Source              string     `json:"source"`
	FieldsMask          []string   `json:"fieldsMask"`
	OwnerUserId         string     `json:"ownerUserId"`
	RenewedAt           *time.Time `json:"renewedAt,omitempty"`
	RenewalAdjustedRate int64      `json:"renewalAdjustedRate" validate:"min=0,max=100"`
}

func (OpportunityUpdateRenewalEvent) UpdateAmount

func (e OpportunityUpdateRenewalEvent) UpdateAmount() bool

func (OpportunityUpdateRenewalEvent) UpdateComments

func (e OpportunityUpdateRenewalEvent) UpdateComments() bool

func (OpportunityUpdateRenewalEvent) UpdateRenewalAdjustedRate

func (e OpportunityUpdateRenewalEvent) UpdateRenewalAdjustedRate() bool

func (OpportunityUpdateRenewalEvent) UpdateRenewalApproved

func (e OpportunityUpdateRenewalEvent) UpdateRenewalApproved() bool

func (OpportunityUpdateRenewalEvent) UpdateRenewalLikelihood

func (e OpportunityUpdateRenewalEvent) UpdateRenewalLikelihood() bool

func (OpportunityUpdateRenewalEvent) UpdateRenewedAt

func (e OpportunityUpdateRenewalEvent) UpdateRenewedAt() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL