event

package
v0.0.0-...-c3a0f46 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ServiceLineItemCreateV1 = "V1_SERVICE_LINE_ITEM_CREATE"
	ServiceLineItemUpdateV1 = "V1_SERVICE_LINE_ITEM_UPDATE"
	ServiceLineItemDeleteV1 = "V1_SERVICE_LINE_ITEM_DELETE"
	ServiceLineItemCloseV1  = "V1_SERVICE_LINE_ITEM_CLOSE"
	ServiceLineItemPauseV1  = "V1_SERVICE_LINE_ITEM_PAUSE"
	ServiceLineItemResumeV1 = "V1_SERVICE_LINE_ITEM_RESUME"
)

Variables

This section is empty.

Functions

func NewServiceLineItemCloseEvent

func NewServiceLineItemCloseEvent(aggregate eventstore.Aggregate, endedAt, updatedAt time.Time, isCanceled bool) (eventstore.Event, error)

func NewServiceLineItemCreateEvent

func NewServiceLineItemCreateEvent(aggregate eventstore.Aggregate, dataFields model.ServiceLineItemDataFields, source common.Source, createdAt, updatedAt, startedAt time.Time, endedAt *time.Time, previousVersionId string) (eventstore.Event, error)

func NewServiceLineItemDeleteEvent

func NewServiceLineItemDeleteEvent(aggregate eventstore.Aggregate) (eventstore.Event, error)

func NewServiceLineItemPauseEvent

func NewServiceLineItemPauseEvent(aggregate eventstore.Aggregate) (eventstore.Event, error)

func NewServiceLineItemResumeEvent

func NewServiceLineItemResumeEvent(aggregate eventstore.Aggregate) (eventstore.Event, error)

func NewServiceLineItemUpdateEvent

func NewServiceLineItemUpdateEvent(aggregate eventstore.Aggregate, dataFields model.ServiceLineItemDataFields, source common.Source, updatedAt time.Time, startedAt *time.Time) (eventstore.Event, error)

Types

type ServiceLineItemCloseEvent

type ServiceLineItemCloseEvent struct {
	Tenant     string    `json:"tenant" validate:"required"`
	EndedAt    time.Time `json:"endedAt" validate:"required"`
	UpdatedAt  time.Time `json:"updatedAt"`
	IsCanceled bool      `json:"isCanceled"`
}

type ServiceLineItemCreateEvent

type ServiceLineItemCreateEvent struct {
	Tenant            string        `json:"tenant" validate:"required"`
	Billed            string        `json:"billed"`
	Quantity          int64         `json:"quantity,omitempty" validate:"min=0"`
	Price             float64       `json:"price,omitempty"`
	Name              string        `json:"name"`
	ContractId        string        `json:"contractId" validate:"required"`
	ParentId          string        `json:"parentId" validate:"required"`
	PreviousVersionId string        `json:"previousVersionId"`
	CreatedAt         time.Time     `json:"createdAt"`
	UpdatedAt         time.Time     `json:"updatedAt"`
	StartedAt         time.Time     `json:"startedAt"`
	EndedAt           *time.Time    `json:"endedAt,omitempty"`
	Source            common.Source `json:"source"`
	Comments          string        `json:"comments,omitempty"`
	VatRate           float64       `json:"vatRate"`
}

type ServiceLineItemDeleteEvent

type ServiceLineItemDeleteEvent struct {
	Tenant string `json:"tenant" validate:"required"`
}

type ServiceLineItemPauseEvent

type ServiceLineItemPauseEvent struct {
	Tenant string `json:"tenant" validate:"required"`
}

type ServiceLineItemResumeEvent

type ServiceLineItemResumeEvent struct {
	Tenant string `json:"tenant" validate:"required"`
}

type ServiceLineItemUpdateEvent

type ServiceLineItemUpdateEvent struct {
	Tenant    string        `json:"tenant" validate:"required"`
	Name      string        `json:"name"`
	Quantity  int64         `json:"quantity,omitempty" validate:"min=0"`
	Price     float64       `json:"price,omitempty"`
	UpdatedAt time.Time     `json:"updatedAt"`
	Billed    string        `json:"billed"`
	Source    common.Source `json:"source"`
	Comments  string        `json:"comments"`
	VatRate   float64       `json:"vatRate"`
	StartedAt *time.Time    `json:"startedAt,omitempty"`
}

Jump to

Keyboard shortcuts

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