repository

package
v0.0.0-...-9ed8f83 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCategoryIDsRecursively

func GetCategoryIDsRecursively(productCategory *models.ProductCategory) []string

Types

type AddressRepo

type AddressRepo struct {
	sql.Repository[models.Address]
}

func AddressRepository

func AddressRepository(db *gorm.DB) *AddressRepo

type AnalyticsConfigRepo

type AnalyticsConfigRepo struct {
	sql.Repository[models.AnalyticsConfig]
}

func AnalyticsConfigRepository

func AnalyticsConfigRepository(db *gorm.DB) *AnalyticsConfigRepo

type BatchJobRepo

type BatchJobRepo struct {
	sql.Repository[models.BatchJob]
}

func BatchJobRepository

func BatchJobRepository(db *gorm.DB) *BatchJobRepo

type CartRepo

type CartRepo struct {
	sql.Repository[models.Cart]
}

func CartRepository

func CartRepository(db *gorm.DB) *CartRepo

type CategoryQueryParams

type CategoryQueryParams struct {
	Value uuid.UUIDs
}

type ClaimImageRepo

type ClaimImageRepo struct {
	sql.Repository[models.ClaimImage]
}

func ClaimImageRepository

func ClaimImageRepository(db *gorm.DB) *ClaimImageRepo

type ClaimItemRepo

type ClaimItemRepo struct {
	sql.Repository[models.ClaimItem]
}

func ClaimItemRepository

func ClaimItemRepository(db *gorm.DB) *ClaimItemRepo

type ClaimRepo

type ClaimRepo struct {
	sql.Repository[models.ClaimOrder]
}

func ClaimRepository

func ClaimRepository(db *gorm.DB) *ClaimRepo

type ClaimTagRepo

type ClaimTagRepo struct {
	sql.Repository[models.ClaimTag]
}

func ClaimTagRepository

func ClaimTagRepository(db *gorm.DB) *ClaimTagRepo

type CountryRepo

type CountryRepo struct {
	sql.Repository[models.Country]
}

func CountryRepository

func CountryRepository(db *gorm.DB) *CountryRepo

type CurrencyRepo

type CurrencyRepo struct {
	sql.Repository[models.Currency]
}

func CurrencyRepository

func CurrencyRepository(db *gorm.DB) *CurrencyRepo

type CustomShippingOptionRepo

type CustomShippingOptionRepo struct {
	sql.Repository[models.CustomShippingOption]
}

func CustomShippingOptionRepository

func CustomShippingOptionRepository(db *gorm.DB) *CustomShippingOptionRepo

type CustomerGroupRepo

type CustomerGroupRepo struct {
	sql.Repository[models.CustomerGroup]
}

TODO: ADD

func CustomerGroupRepository

func CustomerGroupRepository(db *gorm.DB) *CustomerGroupRepo

func (*CustomerGroupRepo) AddCustomers

func (r *CustomerGroupRepo) AddCustomers(ctx context.Context, groupId uuid.UUID, customerIds []uuid.UUID) (*models.CustomerGroup, *utils.ApplictaionError)

func (*CustomerGroupRepo) RemoveCustomers

func (r *CustomerGroupRepo) RemoveCustomers(ctx context.Context, groupId uuid.UUID, customerIds []uuid.UUID) (*models.CustomerGroup, *utils.ApplictaionError)

type CustomerRepo

type CustomerRepo struct {
	sql.Repository[models.Customer]
}

func CustomerRepository

func CustomerRepository(db *gorm.DB) *CustomerRepo

func (*CustomerRepo) ListAndCount

func (r *CustomerRepo) ListAndCount(ctx context.Context, selector *types.FilterableCustomer, config *sql.Options) ([]models.Customer, *int64, *utils.ApplictaionError)

type DiscountConditionJoinTableForeignKey

type DiscountConditionJoinTableForeignKey string
const (
	PRODUCT_ID            DiscountConditionJoinTableForeignKey = "product_id"
	PRODUCT_TYPE_ID       DiscountConditionJoinTableForeignKey = "product_type_id"
	PRODUCT_COLLECTION_ID DiscountConditionJoinTableForeignKey = "product_collection_id"
	PRODUCT_TAG_ID        DiscountConditionJoinTableForeignKey = "product_tag_id"
	CUSTOMER_GROUP_ID     DiscountConditionJoinTableForeignKey = "customer_group_id"
)

type DiscountConditionRepo

type DiscountConditionRepo struct {
	sql.Repository[models.DiscountCondition]
}

func DiscountConditionRepository

func DiscountConditionRepository(db *gorm.DB) *DiscountConditionRepo

func (*DiscountConditionRepo) AddConditionResources

func (r *DiscountConditionRepo) AddConditionResources(ctx context.Context, conditionId uuid.UUID, resource *models.DiscountCondition, overrideExisting bool) ([]models.DiscountCondition, *utils.ApplictaionError)

func (*DiscountConditionRepo) CanApplyForCustomer

func (r *DiscountConditionRepo) CanApplyForCustomer(discountRuleId uuid.UUID, customerId uuid.UUID) (bool, *utils.ApplictaionError)

func (*DiscountConditionRepo) FindOneWithDiscount

func (r *DiscountConditionRepo) FindOneWithDiscount(conditionId uuid.UUID, discountId uuid.UUID) (*models.DiscountCondition, *utils.ApplictaionError)

func (*DiscountConditionRepo) IsValidForProduct

func (r *DiscountConditionRepo) IsValidForProduct(discountRuleId uuid.UUID, productId uuid.UUID) (bool, *utils.ApplictaionError)

func (*DiscountConditionRepo) QueryConditionTable

func (r *DiscountConditionRepo) QueryConditionTable(types models.DiscountConditionType, conditionId uuid.UUID, resourceId uuid.UUID) (*int64, *utils.ApplictaionError)

func (*DiscountConditionRepo) RemoveConditionResources

func (r *DiscountConditionRepo) RemoveConditionResources(ctx context.Context, id uuid.UUID, resource *models.DiscountCondition) *utils.ApplictaionError

TODO: ADD

type DiscountConditionResourceType

type DiscountConditionResourceType interface{}

type DiscountRepo

type DiscountRepo struct {
	sql.Repository[models.Discount]
}

func DiscountRepository

func DiscountRepository(db *gorm.DB) *DiscountRepo

type DiscountRuleRepo

type DiscountRuleRepo struct {
	sql.Repository[models.DiscountRule]
}

func DiscountRuleRepository

func DiscountRuleRepository(db *gorm.DB) *DiscountRuleRepo

type DraftOrderRepo

type DraftOrderRepo struct {
	sql.Repository[models.DraftOrder]
}

func DraftOrderRepository

func DraftOrderRepository(db *gorm.DB) *DraftOrderRepo

type FulfillmentProviderRepo

type FulfillmentProviderRepo struct {
	sql.Repository[models.FulfillmentProvider]
}

func FulfillmentProviderRepository

func FulfillmentProviderRepository(db *gorm.DB) *FulfillmentProviderRepo

type FulfillmentRepo

type FulfillmentRepo struct {
	sql.Repository[models.Fulfillment]
}

func FulfillmentRepository

func FulfillmentRepository(db *gorm.DB) *FulfillmentRepo

type GiftCardRepo

type GiftCardRepo struct {
	sql.Repository[models.GiftCard]
}

func GiftCardRepository

func GiftCardRepository(db *gorm.DB) *GiftCardRepo

type GiftCardTransactionRepo

type GiftCardTransactionRepo struct {
	sql.Repository[models.GiftCardTransaction]
}

func GiftCardTransactionRepository

func GiftCardTransactionRepository(db *gorm.DB) *GiftCardTransactionRepo

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(r Registry) *Handler

type IdempotencyKeyRepo

type IdempotencyKeyRepo struct {
	sql.Repository[models.IdempotencyKey]
}

func IdempotencyKeyRepository

func IdempotencyKeyRepository(db *gorm.DB) *IdempotencyKeyRepo

type ImageRepo

type ImageRepo struct {
	sql.Repository[models.Image]
}

func ImageRepository

func ImageRepository(db *gorm.DB) *ImageRepo

func (ImageRepo) FindByURLs

func (r ImageRepo) FindByURLs(urls []string) ([]models.Image, *utils.ApplictaionError)

func (ImageRepo) InsertBulk

func (r ImageRepo) InsertBulk(data []models.Image) ([]models.Image, *utils.ApplictaionError)

func (ImageRepo) UpsertImages

func (r ImageRepo) UpsertImages(images []models.Image) ([]models.Image, *utils.ApplictaionError)

type InviteRepo

type InviteRepo struct {
	sql.Repository[models.Invite]
}

func InviteRepository

func InviteRepository(db *gorm.DB) *InviteRepo

type LineItemAdjustmentRepo

type LineItemAdjustmentRepo struct {
	sql.Repository[models.LineItemAdjustment]
}

func LineItemAdjustmentRepository

func LineItemAdjustmentRepository(db *gorm.DB) *LineItemAdjustmentRepo

type LineItemRepo

type LineItemRepo struct {
	sql.Repository[models.LineItem]
	// contains filtered or unexported fields
}

func LineItemRepository

func LineItemRepository(db *gorm.DB) *LineItemRepo

func (*LineItemRepo) FindByReturn

func (r *LineItemRepo) FindByReturn(ctx context.Context, returnId uuid.UUID) (*models.LineItem, *models.ReturnItem, *utils.ApplictaionError)

type LineItemTaxLineRepo

type LineItemTaxLineRepo struct {
	sql.Repository[models.LineItemTaxLine]
	// contains filtered or unexported fields
}

func LineItemTaxLineRepository

func LineItemTaxLineRepository(db *gorm.DB) *LineItemTaxLineRepo

func (*LineItemTaxLineRepo) DeleteForCart

func (r *LineItemTaxLineRepo) DeleteForCart(ctx context.Context, cartId uuid.UUID) *utils.ApplictaionError

type MoneyAmountRepo

type MoneyAmountRepo struct {
	sql.Repository[models.MoneyAmount]
}

func MoneyAmountRepository

func MoneyAmountRepository(db *gorm.DB) *MoneyAmountRepo

func (*MoneyAmountRepo) AddPriceListPrices

func (r *MoneyAmountRepo) AddPriceListPrices(priceListId uuid.UUID, prices []models.MoneyAmount, overrideExisting bool) ([]models.MoneyAmount, *utils.ApplictaionError)

func (*MoneyAmountRepo) CreateProductVariantMoneyAmounts

func (r *MoneyAmountRepo) CreateProductVariantMoneyAmounts(toCreate []models.MoneyAmount) *utils.ApplictaionError

func (*MoneyAmountRepo) DeletePriceListPrices

func (r *MoneyAmountRepo) DeletePriceListPrices(priceListId uuid.UUID, moneyAmountIds uuid.UUIDs) *utils.ApplictaionError

func (*MoneyAmountRepo) DeleteVariantPricesNotIn

func (r *MoneyAmountRepo) DeleteVariantPricesNotIn(variantId uuid.UUID, prices []models.MoneyAmount) *utils.ApplictaionError

func (*MoneyAmountRepo) FindCurrencyMoneyAmounts

func (r *MoneyAmountRepo) FindCurrencyMoneyAmounts(where []models.MoneyAmount) ([]models.MoneyAmount, *utils.ApplictaionError)

func (*MoneyAmountRepo) FindManyForVariantInPriceList

func (r *MoneyAmountRepo) FindManyForVariantInPriceList(variantId uuid.UUID, priceListId uuid.UUID, requiresPriceList bool) ([]models.MoneyAmount, *int64, *utils.ApplictaionError)

func (*MoneyAmountRepo) FindManyForVariantInRegion

func (r *MoneyAmountRepo) FindManyForVariantInRegion(variantId uuid.UUID, regionId uuid.UUID, currencyCode string, customerId uuid.UUID, includeDiscountPrices bool, includeTaxInclusivePricing bool) ([]models.MoneyAmount, *int64, *utils.ApplictaionError)

func (*MoneyAmountRepo) FindManyForVariantsInRegion

func (r *MoneyAmountRepo) FindManyForVariantsInRegion(variantIds uuid.UUIDs, regionId uuid.UUID, currencyCode string, customerId uuid.UUID, includeDiscountPrices bool, includeTaxInclusivePricing bool) (map[uuid.UUID][]models.MoneyAmount, *int64, *utils.ApplictaionError)

func (*MoneyAmountRepo) FindRegionMoneyAmounts

func (r *MoneyAmountRepo) FindRegionMoneyAmounts(where []models.MoneyAmount) ([]models.MoneyAmount, *utils.ApplictaionError)

func (*MoneyAmountRepo) FindVariantPricesNotIn

func (r *MoneyAmountRepo) FindVariantPricesNotIn(variantId uuid.UUID, prices []models.MoneyAmount) ([]models.MoneyAmount, *utils.ApplictaionError)

func (*MoneyAmountRepo) GetPricesForVariantInRegion

func (r *MoneyAmountRepo) GetPricesForVariantInRegion(variantId uuid.UUID, regionId uuid.UUID) ([]models.MoneyAmount, *utils.ApplictaionError)

func (*MoneyAmountRepo) InsertBulk

func (*MoneyAmountRepo) UpdatePriceListPrices

func (r *MoneyAmountRepo) UpdatePriceListPrices(priceListId uuid.UUID, updates []models.MoneyAmount) ([]models.MoneyAmount, *utils.ApplictaionError)

func (*MoneyAmountRepo) UpsertVariantCurrencyPrice

func (r *MoneyAmountRepo) UpsertVariantCurrencyPrice(variantId uuid.UUID, price models.MoneyAmount) (*models.MoneyAmount, *utils.ApplictaionError)

type NoteRepo

type NoteRepo struct {
	sql.Repository[models.Note]
}

func NoteRepository

func NoteRepository(db *gorm.DB) *NoteRepo

type NotificationProviderRepo

type NotificationProviderRepo struct {
	sql.Repository[models.NotificationProvider]
}

func NotificationProviderRepository

func NotificationProviderRepository(db *gorm.DB) *NotificationProviderRepo

type NotificationRepo

type NotificationRepo struct {
	sql.Repository[models.Notification]
}

func NotificationRepository

func NotificationRepository(db *gorm.DB) *NotificationRepo

type OAuthRepo

type OAuthRepo struct {
	sql.Repository[models.OAuth]
}

func OAuthRepository

func OAuthRepository(db *gorm.DB) *OAuthRepo

type OrderEditRepo

type OrderEditRepo struct {
	sql.Repository[models.OrderEdit]
}

func OrderEditRepository

func OrderEditRepository(db *gorm.DB) *OrderEditRepo

type OrderItemChangeRepo

type OrderItemChangeRepo struct {
	sql.Repository[models.OrderItemChange]
}

func OrderItemChangeRepository

func OrderItemChangeRepository(db *gorm.DB) *OrderItemChangeRepo

type OrderRepo

type OrderRepo struct {
	sql.Repository[models.Order]
}

func OrderRepository

func OrderRepository(db *gorm.DB) *OrderRepo

type PaymentCollectionRepo

type PaymentCollectionRepo struct {
	sql.Repository[models.PaymentCollection]
}

TODO: Add

func PaymentCollectionRepository

func PaymentCollectionRepository(db *gorm.DB) *PaymentCollectionRepo

func (*PaymentCollectionRepo) GetPaymentCollectionIdByPaymentId

func (r *PaymentCollectionRepo) GetPaymentCollectionIdByPaymentId(paymentId uuid.UUID, config *sql.Options) (*models.PaymentCollection, *utils.ApplictaionError)

func (*PaymentCollectionRepo) GetPaymentCollectionIdBySessionId

func (r *PaymentCollectionRepo) GetPaymentCollectionIdBySessionId(sessionId uuid.UUID, config *sql.Options) (*models.PaymentCollection, *utils.ApplictaionError)

type PaymentProviderRepo

type PaymentProviderRepo struct {
	sql.Repository[models.PaymentProvider]
}

func PaymentProviderRepository

func PaymentProviderRepository(db *gorm.DB) *PaymentProviderRepo

type PaymentRepo

type PaymentRepo struct {
	sql.Repository[models.Payment]
}

func PaymentRepository

func PaymentRepository(db *gorm.DB) *PaymentRepo

type PaymentSessionRepo

type PaymentSessionRepo struct {
	sql.Repository[models.PaymentSession]
}

func PaymentSessionRepository

func PaymentSessionRepository(db *gorm.DB) *PaymentSessionRepo

type PriceListRepo

type PriceListRepo struct {
	sql.Repository[models.PriceList]
}

func PriceListRepository

func PriceListRepository(db *gorm.DB) *PriceListRepo

func (*PriceListRepo) ListAndCount

func (r *PriceListRepo) ListAndCount(ctx context.Context, selector *types.FilterablePriceList, config *sql.Options, q *string) ([]models.PriceList, *int64, *utils.ApplictaionError)

func (*PriceListRepo) ListPriceListsVariantIdsMap

func (r *PriceListRepo) ListPriceListsVariantIdsMap(priceListIds uuid.UUIDs) (map[string][]string, *utils.ApplictaionError)

type ProductCategoryRepo

type ProductCategoryRepo struct {
	sql.Repository[models.ProductCategory]
}

func ProductCategoryRepository

func ProductCategoryRepository(db *gorm.DB) *ProductCategoryRepo

func (*ProductCategoryRepo) AddProducts

func (r *ProductCategoryRepo) AddProducts(productCategoryId uuid.UUID, productIds uuid.UUIDs) *utils.ApplictaionError

func (*ProductCategoryRepo) FindOneWithDescendants

func (r *ProductCategoryRepo) FindOneWithDescendants(ctx context.Context, query sql.Query, q *string) (*models.ProductCategory, *utils.ApplictaionError)

func (*ProductCategoryRepo) GetFreeTextSearchResultsAndCount

func (r *ProductCategoryRepo) GetFreeTextSearchResultsAndCount(ctx context.Context, query sql.Query, q *string, includeTree bool) ([]models.ProductCategory, *int64, *utils.ApplictaionError)

func (*ProductCategoryRepo) RemoveProducts

func (r *ProductCategoryRepo) RemoveProducts(productCategoryId uuid.UUID, productIds uuid.UUIDs) *utils.ApplictaionError

type ProductCollectionRepo

type ProductCollectionRepo struct {
	sql.Repository[models.ProductCollection]
}

func ProductCollectionRepository

func ProductCollectionRepository(db *gorm.DB) *ProductCollectionRepo

func (*ProductCollectionRepo) FindAndCountByDiscountConditionId

func (r *ProductCollectionRepo) FindAndCountByDiscountConditionId(ctx context.Context, conditionId uuid.UUID, query sql.Query) ([]models.ProductCollection, *int64, *utils.ApplictaionError)

type ProductOptionRepo

type ProductOptionRepo struct {
	sql.Repository[models.ProductOption]
}

func ProductOptionRepository

func ProductOptionRepository(db *gorm.DB) *ProductOptionRepo

type ProductOptionValueRepo

type ProductOptionValueRepo struct {
	sql.Repository[models.ProductOptionValue]
}

func ProductOptionValueRepository

func ProductOptionValueRepository(db *gorm.DB) *ProductOptionValueRepo

type ProductRepo

type ProductRepo struct {
	sql.Repository[models.Product]
}

func ProductRepository

func ProductRepository(db *gorm.DB) *ProductRepo

func (*ProductRepo) BulkAddToCollection

func (r *ProductRepo) BulkAddToCollection(productIds uuid.UUIDs, collectionId uuid.UUID) ([]models.Product, *utils.ApplictaionError)

func (*ProductRepo) BulkRemoveFromCollection

func (r *ProductRepo) BulkRemoveFromCollection(productIds uuid.UUIDs, collectionId uuid.UUID) *utils.ApplictaionError

func (*ProductRepo) GetCategoryIDsFromInput

func (r *ProductRepo) GetCategoryIDsFromInput(categoryID CategoryQueryParams, includeCategoryChildren bool) uuid.UUIDs

func (*ProductRepo) GetFreeTextSearchResultsAndCount

func (r *ProductRepo) GetFreeTextSearchResultsAndCount(q *string, options sql.Query, relations []string) ([]models.Product, *int64, *utils.ApplictaionError)

func (*ProductRepo) IsProductInSalesChannels

func (r *ProductRepo) IsProductInSalesChannels(id uuid.UUID, salesChannelIDs uuid.UUIDs) bool

type ProductTagRepo

type ProductTagRepo struct {
	sql.Repository[models.ProductTag]
}

func ProductTagRepository

func ProductTagRepository(db *gorm.DB) *ProductTagRepo

func (*ProductTagRepo) FindAndCountByDiscountConditionID

func (r *ProductTagRepo) FindAndCountByDiscountConditionID(conditionID uuid.UUID, query sql.Query) ([]models.ProductTag, *int64, *utils.ApplictaionError)

func (*ProductTagRepo) InsertBulk

func (*ProductTagRepo) ListTagsByUsage

func (r *ProductTagRepo) ListTagsByUsage(take int) ([]models.ProductTag, *utils.ApplictaionError)

func (*ProductTagRepo) UpsertTags

type ProductTaxRateRepo

type ProductTaxRateRepo struct {
	sql.Repository[models.ProductTaxRate]
}

func ProductTaxRateRepository

func ProductTaxRateRepository(db *gorm.DB) *ProductTaxRateRepo

type ProductTypeRepo

type ProductTypeRepo struct {
	sql.Repository[models.ProductType]
}

func ProductTypeRepository

func ProductTypeRepository(db *gorm.DB) *ProductTypeRepo

func (*ProductTypeRepo) FindAndCountByDiscountConditionId

func (r *ProductTypeRepo) FindAndCountByDiscountConditionId(conditionId uuid.UUID, query sql.Query) ([]models.ProductType, int64, *utils.ApplictaionError)

func (*ProductTypeRepo) UpsertType

type ProductVariantInventoryItem

type ProductVariantInventoryItem struct {
	sql.Repository[models.ProductVariantInventoryItem]
}

func ProductVariantInventoryItemRepository

func ProductVariantInventoryItemRepository(db *gorm.DB) *ProductVariantInventoryItem

type ProductVariantRepo

type ProductVariantRepo struct {
	sql.Repository[models.ProductVariant]
}

func ProductVariantRepository

func ProductVariantRepository(db *gorm.DB) *ProductVariantRepo

type PublishableApiKeyRepo

type PublishableApiKeyRepo struct {
	sql.Repository[models.PublishableApiKey]
}

func PublishableApiKeyRepository

func PublishableApiKeyRepository(db *gorm.DB) *PublishableApiKeyRepo

type PublishableApiKeySalesChannelRepo

type PublishableApiKeySalesChannelRepo struct {
	sql.Repository[models.PublishableApiKeySalesChannel]
}

func PublishableApiKeySalesChannelRepository

func PublishableApiKeySalesChannelRepository(db *gorm.DB) *PublishableApiKeySalesChannelRepo

func (*PublishableApiKeySalesChannelRepo) AddSalesChannels

func (r *PublishableApiKeySalesChannelRepo) AddSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) *utils.ApplictaionError

func (*PublishableApiKeySalesChannelRepo) FindSalesChannels

func (*PublishableApiKeySalesChannelRepo) RemoveSalesChannels

func (r *PublishableApiKeySalesChannelRepo) RemoveSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) *utils.ApplictaionError

type RefundRepo

type RefundRepo struct {
	sql.Repository[models.Refund]
}

func RefundRepository

func RefundRepository(db *gorm.DB) *RefundRepo

type RegionRepo

type RegionRepo struct {
	sql.Repository[models.Region]
}

func RegionRepository

func RegionRepository(db *gorm.DB) *RegionRepo

type Registry

type Registry interface {
}

type ReturnItemRepo

type ReturnItemRepo struct {
	sql.Repository[models.ReturnItem]
}

func ReturnItemRepository

func ReturnItemRepository(db *gorm.DB) *ReturnItemRepo

type ReturnReasonRepo

type ReturnReasonRepo struct {
	sql.Repository[models.ReturnReason]
}

func ReturnReasonRepository

func ReturnReasonRepository(db *gorm.DB) *ReturnReasonRepo

type ReturnRepo

type ReturnRepo struct {
	sql.Repository[models.Return]
}

func ReturnRepository

func ReturnRepository(db *gorm.DB) *ReturnRepo

type SalesChannelLocationRepo

type SalesChannelLocationRepo struct {
	sql.Repository[models.SalesChannelLocation]
}

func SalesChannelLocationRepository

func SalesChannelLocationRepository(db *gorm.DB) *SalesChannelLocationRepo

type SalesChannelRepo

type SalesChannelRepo struct {
	sql.Repository[models.SalesChannel]
}

func SalesChannelRepository

func SalesChannelRepository(db *gorm.DB) *SalesChannelRepo

func (*SalesChannelRepo) AddProducts

func (r *SalesChannelRepo) AddProducts(salesChannelId uuid.UUID, productIds uuid.UUIDs, isMedusaV2Enabled bool) *utils.ApplictaionError

func (*SalesChannelRepo) GetFreeTextSearchResults

func (r *SalesChannelRepo) GetFreeTextSearchResults(ctx context.Context, q *string, config *sql.Options) ([]models.SalesChannel, *int64, error)

func (*SalesChannelRepo) ListProductIdsBySalesChannelIds

func (r *SalesChannelRepo) ListProductIdsBySalesChannelIds(salesChannelIds uuid.UUIDs) (map[string][]string, *utils.ApplictaionError)

func (*SalesChannelRepo) RemoveProducts

func (r *SalesChannelRepo) RemoveProducts(salesChannelId uuid.UUID, productIds uuid.UUIDs) *utils.ApplictaionError

type ShippingMethodRepo

type ShippingMethodRepo struct {
	sql.Repository[models.ShippingMethod]
}

func ShippingMethodRepository

func ShippingMethodRepository(db *gorm.DB) *ShippingMethodRepo

type ShippingMethodTaxLineRepo

type ShippingMethodTaxLineRepo struct {
	sql.Repository[models.ShippingMethodTaxLine]
	// contains filtered or unexported fields
}

func ShippingMethodTaxLineRepository

func ShippingMethodTaxLineRepository(db *gorm.DB) *ShippingMethodTaxLineRepo

func (*ShippingMethodTaxLineRepo) DeleteForCart

func (r *ShippingMethodTaxLineRepo) DeleteForCart(ctx context.Context, cartId uuid.UUID) *utils.ApplictaionError

type ShippingOptionRepo

type ShippingOptionRepo struct {
	sql.Repository[models.ShippingOption]
}

func ShippingOptionRepository

func ShippingOptionRepository(db *gorm.DB) *ShippingOptionRepo

type ShippingOptionRequirementRepo

type ShippingOptionRequirementRepo struct {
	sql.Repository[models.ShippingOptionRequirement]
}

func ShippingOptionRequirementRepository

func ShippingOptionRequirementRepository(db *gorm.DB) *ShippingOptionRequirementRepo

type ShippingProfileRepo

type ShippingProfileRepo struct {
	sql.Repository[models.ShippingProfile]
}

func ShippingProfileRepository

func ShippingProfileRepository(db *gorm.DB) *ShippingProfileRepo

func (*ShippingProfileRepo) FindByProducts

func (r *ShippingProfileRepo) FindByProducts(productIds uuid.UUIDs) (map[string]models.ShippingProfile, *utils.ApplictaionError)

type ShippingTaxRateRepo

type ShippingTaxRateRepo struct {
	sql.Repository[models.ShippingTaxRate]
}

func ShippingTaxRateRepository

func ShippingTaxRateRepository(db *gorm.DB) *ShippingTaxRateRepo

type StagedJobRepo

type StagedJobRepo struct {
	sql.Repository[models.StagedJob]
}

func StagedJobRepository

func StagedJobRepository(db *gorm.DB) *StagedJobRepo

type StoreRepo

type StoreRepo struct {
	sql.Repository[models.Store]
}

func StoreRepository

func StoreRepository(db *gorm.DB) *StoreRepo

type SwapRepo

type SwapRepo struct {
	sql.Repository[models.Swap]
}

func SwapRepository

func SwapRepository(db *gorm.DB) *SwapRepo

type TaxProviderRepo

type TaxProviderRepo struct {
	sql.Repository[models.TaxProvider]
}

func TaxProviderRepository

func TaxProviderRepository(db *gorm.DB) *TaxProviderRepo

type TaxRateRepo

type TaxRateRepo struct {
	sql.Repository[models.TaxRate]
}

func TaxRateRepository

func TaxRateRepository(db *gorm.DB) *TaxRateRepo

func (*TaxRateRepo) AddToProduct

func (r *TaxRateRepo) AddToProduct(id uuid.UUID, productIds uuid.UUIDs, overrideExisting bool) ([]models.ProductTaxRate, *utils.ApplictaionError)

func (*TaxRateRepo) AddToProductType

func (r *TaxRateRepo) AddToProductType(id uuid.UUID, productTypeIds uuid.UUIDs, overrideExisting bool) ([]models.ProductTypeTaxRate, *utils.ApplictaionError)

func (*TaxRateRepo) AddToShippingOption

func (r *TaxRateRepo) AddToShippingOption(id uuid.UUID, optionIds uuid.UUIDs, overrideExisting bool) ([]models.ShippingTaxRate, *utils.ApplictaionError)

func (*TaxRateRepo) ApplyResolutionsToQueryBuilder

func (r *TaxRateRepo) ApplyResolutionsToQueryBuilder(qb *gorm.DB, resolverFields []string) *gorm.DB

func (*TaxRateRepo) FindAndCountWithResolution

func (r *TaxRateRepo) FindAndCountWithResolution(options sql.Query) ([]models.TaxRate, *int64, *utils.ApplictaionError)

func (*TaxRateRepo) FindOneWithResolution

func (r *TaxRateRepo) FindOneWithResolution(options sql.Query) (*models.TaxRate, *utils.ApplictaionError)

func (*TaxRateRepo) FindWithResolution

func (r *TaxRateRepo) FindWithResolution(options sql.Query) ([]models.TaxRate, *utils.ApplictaionError)

func (*TaxRateRepo) GetFindQueryBuilder

func (r *TaxRateRepo) GetFindQueryBuilder(options sql.Query) *gorm.DB

func (*TaxRateRepo) ListByProduct

func (r *TaxRateRepo) ListByProduct(productId uuid.UUID, config types.TaxRateListByConfig) ([]models.TaxRate, *utils.ApplictaionError)

func (*TaxRateRepo) ListByShippingOption

func (r *TaxRateRepo) ListByShippingOption(optionId uuid.UUID) ([]models.TaxRate, *utils.ApplictaionError)

func (*TaxRateRepo) RemoveFromProduct

func (r *TaxRateRepo) RemoveFromProduct(id uuid.UUID, productIds uuid.UUIDs) *utils.ApplictaionError

func (*TaxRateRepo) RemoveFromProductType

func (r *TaxRateRepo) RemoveFromProductType(id uuid.UUID, productTypeIds uuid.UUIDs) *utils.ApplictaionError

func (*TaxRateRepo) RemoveFromShippingOption

func (r *TaxRateRepo) RemoveFromShippingOption(id uuid.UUID, optionIds uuid.UUIDs) *utils.ApplictaionError

type TrackingLinkRepo

type TrackingLinkRepo struct {
	sql.Repository[models.TrackingLink]
}

func TrackingLinkRepository

func TrackingLinkRepository(db *gorm.DB) *TrackingLinkRepo

type UpsertTypeInput

type UpsertTypeInput struct {
	Id    uuid.UUID `json:"id,omitempty" validate:"omitempty"`
	Value string    `json:"value"`
}

type UserRepo

type UserRepo struct {
	sql.Repository[models.User]
}

func UserRepository

func UserRepository(db *gorm.DB) *UserRepo

Jump to

Keyboard shortcuts

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