country

package
v0.0.0-...-05932af 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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CountryAggregateType eventstore.AggregateType = "country"
)
View Source
const (
	CountryCreateV1 = "V1_COUNTRY_CREATE"
)

Variables

This section is empty.

Functions

func GetCountryObjectID

func GetCountryObjectID(aggregateID string) string

func NewCountryAggregateWithID

func NewCountryAggregateWithID(id string) *countryAggregate

func NewCountryCreateEvent

func NewCountryCreateEvent(aggregate eventstore.Aggregate, name, codeA2, codeA3, phoneCode string, createdAt time.Time) (eventstore.Event, error)

Types

type Country

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

	Name      string `json:"name"`
	CodeA2    string `json:"codeA2"`
	CodeA3    string `json:"codeA3"`
	PhoneCode string `json:"phoneCode"`
}

type CountryCreateEvent

type CountryCreateEvent struct {
	CreatedAt time.Time `json:"createdAt"`

	Name      string `json:"name" validate:"required"`
	CodeA2    string `json:"codeA2" validate:"required"`
	CodeA3    string `json:"codeA3" validate:"required"`
	PhoneCode string `json:"phoneCode" validate:"required"`
}

Jump to

Keyboard shortcuts

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