command

package
v0.0.0-...-fb57439 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListingCreateCmd

type ListingCreateCmd struct {
	Account              account.Entity                      `json:"-"`
	Business             listing.Business                    `json:"-"`
	Images               []listing.Image                     `json:"images" validate:"min=1,max=10,dive,required"`
	Meta                 *ListingMetaRequest                 `json:"meta" validate:"required,dive"`
	CategoryUUIDs        []string                            `json:"categoryUUIDs" validate:"required,min=1,max=30,dive,required,object_id"`
	Features             []listing.Feature                   `json:"features" validate:"required,min=0,max=30,dive,required"`
	Prices               []listing.ListingPriceValidationDto `json:"prices" validate:"required,min=1,max=100,dive,required"`
	ExtraPaymentChannels []payment.Channel                   `json:"extraPaymentChannels" bson:"extra_payment_channels" validate:"required,min=1,max=30,dive,required,oneof=at_the_door"`
	Location             *listing.Location                   `json:"location" validate:"required,dive"`
	Boosts               []listing.Boost                     `json:"boosts" validate:"omitempty,min=0,max=10,dive,required"`
	Validation           *listing.Validation                 `json:"validation" validate:"required,dive"`
	Currency             string                              `json:"currency" validate:"required,oneof=TRY USD EUR"`
}

type ListingCreateHandler

type ListingCreateHandler cqrs.HandlerFunc[ListingCreateCmd, *ListingCreateRes]

func NewListingCreateHandler

func NewListingCreateHandler(factory listing.Factory, repo listing.Repository, events listing.Events) ListingCreateHandler

type ListingCreateRes

type ListingCreateRes struct {
	UUID string `json:"uuid"`
}

type ListingDeleteCmd

type ListingDeleteCmd struct {
	ListingUUID string `json:"-"`
}

type ListingDeleteHandler

type ListingDeleteHandler cqrs.HandlerFunc[ListingDeleteCmd, *ListingDeleteRes]

func NewListingDeleteHandler

func NewListingDeleteHandler(repo listing.Repository, events listing.Events) ListingDeleteHandler

type ListingDeleteRes

type ListingDeleteRes struct{}

type ListingDetailCmd

type ListingDetailCmd struct {
	ListingUUID string `json:"listingUUID" params:"uuid" validate:"required,object_id"`
}

type ListingDisableCmd

type ListingDisableCmd struct {
	Account          account.Entity `json:"-"`
	ListingUUID      string         `json:"-"`
	BusinessNickName string         `json:"-"`
}

type ListingDisableRes

type ListingDisableRes struct{}

type ListingEnableCmd

type ListingEnableCmd struct {
	Account          account.Entity `json:"-"`
	ListingUUID      string         `json:"-"`
	BusinessNickName string         `json:"-"`
}

type ListingEnableHandler

type ListingEnableHandler cqrs.HandlerFunc[ListingEnableCmd, *ListingEnableRes]

func NewListingEnableHandler

func NewListingEnableHandler(repo listing.Repository, events listing.Events) ListingEnableHandler

type ListingEnableRes

type ListingEnableRes struct{}

type ListingMetaRequest

type ListingMetaRequest struct {
	TR *listing.Meta `json:"tr" validate:"required,dive"`
	EN *listing.Meta `json:"en" validate:"required,dive"`
}

type ListingReOrderCmd

type ListingReOrderCmd struct {
	Account          account.Entity `json:"-"`
	ListingUUID      string         `json:"-"`
	Order            *int           `json:"order" validate:"required,min=-1,number"`
	BusinessNickName string         `json:"-"`
}

type ListingReOrderRes

type ListingReOrderRes struct{}

type ListingRestoreCmd

type ListingRestoreCmd struct {
	ListingUUID string `json:"-"`
}

type ListingRestoreRes

type ListingRestoreRes struct{}

type ListingUpdateBusinessNickNameCmd

type ListingUpdateBusinessNickNameCmd struct{}

type ListingUpdateBusinessNickNameRes

type ListingUpdateBusinessNickNameRes struct{}

type ListingUpdateCmd

type ListingUpdateCmd struct {
	Account              account.Entity                      `json:"-"`
	Business             listing.Business                    `json:"-"`
	ListingUUID          string                              `json:"-"`
	Images               []listing.Image                     `json:"images" validate:"min=1,max=10,dive,required"`
	Meta                 *ListingMetaRequest                 `json:"meta" validate:"required,dive"`
	CategoryUUIDs        []string                            `json:"categoryUUIDs" validate:"required,min=1,max=30,dive,required,object_id"`
	ExtraPaymentChannels []payment.Channel                   `json:"extraPaymentChannels" bson:"extra_payment_channels" validate:"required,min=1,max=30,dive,required,oneof=at_the_door"`
	Features             []listing.Feature                   `json:"features" validate:"required,min=0,max=30,dive,required"`
	Prices               []listing.ListingPriceValidationDto `json:"prices" validate:"required,min=1,max=100,dive,required"`
	Location             *listing.Location                   `json:"location" validate:"required,dive"`
	Boosts               []listing.Boost                     `json:"boosts" validate:"omitempty,min=0,max=10,dive,required"`
	Validation           *listing.Validation                 `json:"validation" validate:"required,dive"`
	Currency             listing.Currency                    `json:"currency" validate:"required,oneof=TRY USD EUR"`
}

type ListingUpdateHandler

type ListingUpdateHandler cqrs.HandlerFunc[ListingUpdateCmd, *ListingUpdateRes]

func NewListingUpdateHandler

func NewListingUpdateHandler(factory listing.Factory, repo listing.Repository, events listing.Events) ListingUpdateHandler

type ListingUpdateRes

type ListingUpdateRes struct {
}

type ListingValidateBookingCmd

type ListingValidateBookingCmd struct {
	BookingUUID string          `json:"booking_uuid"`
	ListingUUID string          `json:"listing_uuid"`
	People      *booking.People `json:"people"`
	StartDate   time.Time       `json:"start_date"`
	EndDate     time.Time       `json:"end_date"`
}

type ListingValidateBookingRes

type ListingValidateBookingRes struct{}

type ListingValidatedCmd

type ListingValidatedCmd struct {
	New     *listing.Entity `json:"-"`
	Account account.Entity  `json:"-"`
}

type ListingValidatedRes

type ListingValidatedRes struct{}

Jump to

Keyboard shortcuts

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