invoicing_cycle

package
v0.0.0-...-4518f94 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvoicingCycleCreateV1 = "V1_INVOICING_CYCLE_CREATE"
	InvoicingCycleUpdateV1 = "V1_INVOICING_CYCLE_UPDATE"
)
View Source
const (
	InvoicingCycleAggregateType eventstore.AggregateType = "invoicing_cycle"
)

Variables

This section is empty.

Functions

func GetInvoicingCycleObjectID

func GetInvoicingCycleObjectID(aggregateID string, tenant string) string

func NewInvoicingCycleCreateEvent

func NewInvoicingCycleCreateEvent(aggregate eventstore.Aggregate, invoicingCycleType string, createdAt *time.Time, sourceFields commonmodel.Source) (eventstore.Event, error)

func NewInvoicingCycleUpdateEvent

func NewInvoicingCycleUpdateEvent(aggregate eventstore.Aggregate, invoicingCycleType string, updatedAt *time.Time, sourceFields commonmodel.Source) (eventstore.Event, error)

Types

type CreateInvoicingCycleHandler

type CreateInvoicingCycleHandler interface {
	Handle(ctx context.Context, baseRequest eventstore.BaseRequest, request *invoicingcyclepb.CreateInvoicingCycleTypeRequest) error
}

type EventHandlers

type EventHandlers struct {
	CreateInvoicingCycle CreateInvoicingCycleHandler
	UpdateInvoicingCycle UpdateInvoicingCycleHandler
}

func NewEventHandlers

func NewEventHandlers(log logger.Logger, es eventstore.AggregateStore) *EventHandlers

type InvoicingCycle

type InvoicingCycle struct {
	ID           string             `json:"id"`
	Type         string             `json:"type"`
	CreatedAt    time.Time          `json:"createdAt"`
	UpdatedAt    time.Time          `json:"updatedAt"`
	SourceFields commonmodel.Source `json:"source"`
}

type InvoicingCycleAggregate

type InvoicingCycleAggregate struct {
	*aggregate.CommonTenantIdAggregate
	InvoicingCycle *InvoicingCycle
}

func LoadInvoicingCycleAggregate

func LoadInvoicingCycleAggregate(ctx context.Context, eventStore eventstore.AggregateStore, tenant, objectID string) (*InvoicingCycleAggregate, error)

func NewInvoicingCycleAggregateWithTenantAndID

func NewInvoicingCycleAggregateWithTenantAndID(tenant, id string) *InvoicingCycleAggregate

func (*InvoicingCycleAggregate) When

type InvoicingCycleCreateEvent

type InvoicingCycleCreateEvent struct {
	Tenant       string             `json:"tenant" validate:"required"`
	Type         string             `json:"type"`
	CreatedAt    time.Time          `json:"createdAt"`
	SourceFields commonmodel.Source `json:"sourceFields"`
}

type InvoicingCycleType

type InvoicingCycleType int32
const (
	DATE InvoicingCycleType = iota
	ANNIVERSARY
)

func (InvoicingCycleType) StringValue

type InvoicingCycleTypeString

type InvoicingCycleTypeString string
const (
	InvoicingCycleTypeDate        InvoicingCycleTypeString = "DATE"
	InvoicingCycleTypeAnniversary InvoicingCycleTypeString = "ANNIVERSARY"
)

type InvoicingCycleUpdateEvent

type InvoicingCycleUpdateEvent struct {
	Tenant       string             `json:"tenant" validate:"required"`
	Type         string             `json:"type,omitempty"`
	UpdatedAt    time.Time          `json:"updatedAt"`
	SourceFields commonmodel.Source `json:"sourceFields"`
}

type UpdateInvoicingCycleHandler

type UpdateInvoicingCycleHandler interface {
	Handle(ctx context.Context, baseRequest eventstore.BaseRequest, request *invoicingcyclepb.UpdateInvoicingCycleTypeRequest) error
}

Jump to

Keyboard shortcuts

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