Documentation ¶
Index ¶
- Constants
- func NewOpportunityCloseLooseEvent(aggregate eventstore.Aggregate, closedAt time.Time) (eventstore.Event, error)
- func NewOpportunityCreateRenewalEvent(aggregate eventstore.Aggregate, contractId, renewalLikelihood string, ...) (eventstore.Event, error)
- func NewOpportunityUpdateNextCycleDateEvent(aggregate eventstore.Aggregate, updatedAt time.Time, renewedAt *time.Time) (eventstore.Event, error)
- type OpportunityAggregate
- type OpportunityCloseLooseEvent
- type OpportunityCreateRenewalEvent
- type OpportunityUpdateNextCycleDateEvent
Constants ¶
View Source
const ( OpportunityCreateV1 = "V1_OPPORTUNITY_CREATE" OpportunityUpdateV1 = "V1_OPPORTUNITY_UPDATE" OpportunityCreateRenewalV1 = "V1_OPPORTUNITY_CREATE_RENEWAL" OpportunityUpdateRenewalV1 = "V1_OPPORTUNITY_UPDATE_RENEWAL" OpportunityUpdateNextCycleDateV1 = "V1_OPPORTUNITY_UPDATE_NEXT_CYCLE_DATE" OpportunityCloseWinV1 = "V1_OPPORTUNITY_CLOSE_WIN" OpportunityCloseLooseV1 = "V1_OPPORTUNITY_CLOSE_LOOSE" )
View Source
const ( FieldMaskName = "name" FieldMaskAmount = "amount" FieldMaskMaxAmount = "maxAmount" FieldMaskComments = "comments" FieldMaskRenewalLikelihood = "renewalLikelihood" FieldMaskRenewalApproved = "renewalApproved" FieldMaskRenewedAt = "renewedAt" FieldMaskAdjustedRate = "adjustedRate" FieldMaskExternalType = "externalType" FieldMaskInternalType = "internalType" FieldMaskExternalStage = "externalStage" FieldMaskInternalStage = "internalStage" FieldMaskEstimatedClosedAt = "estimatedClosedAt" FieldMaskOwnerUserId = "ownerUserId" FieldMaskCurrency = "currency" FieldMaskNextSteps = "nextSteps" FieldMaskLikelihoodRate = "likelihoodRate" )
View Source
const (
OpportunityAggregateType eventstore.AggregateType = "opportunity"
)
Variables ¶
This section is empty.
Functions ¶
func NewOpportunityCloseLooseEvent ¶
func NewOpportunityCloseLooseEvent(aggregate eventstore.Aggregate, closedAt time.Time) (eventstore.Event, error)
func NewOpportunityUpdateNextCycleDateEvent ¶
func NewOpportunityUpdateNextCycleDateEvent(aggregate eventstore.Aggregate, updatedAt time.Time, renewedAt *time.Time) (eventstore.Event, error)
Types ¶
type OpportunityAggregate ¶
type OpportunityAggregate struct {
*eventstore.CommonTenantIdAggregate
}
func NewOpportunityAggregateWithTenantAndID ¶
func NewOpportunityAggregateWithTenantAndID(tenant, id string) *OpportunityAggregate
type OpportunityCreateRenewalEvent ¶
type OpportunityCreateRenewalEvent struct { Tenant string `json:"tenant" validate:"required"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Source common.Source `json:"source"` ContractId string `json:"contractId" validate:"required"` InternalType string `json:"internalType"` InternalStage string `json:"internalStage"` RenewalLikelihood string `json:"renewalLikelihood" validate:"required" enums:"HIGH,MEDIUM,LOW,ZERO"` RenewalApproved bool `json:"renewalApproved,omitempty"` RenewedAt *time.Time `json:"renewedAt,omitempty"` RenewalAdjustedRate int64 `json:"renewalAdjustedRate" validate:"min=0,max=100"` }
Click to show internal directories.
Click to hide internal directories.