salesDTO

package
v0.0.0-...-e9ec6a3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSaleDTO

type CreateSaleDTO struct {
	CustomerCareID string                     `validate:"required,uuid" json:"customer_care_id"`
	PaymentMethod  saleEnum.PaymentMethod     `validate:"required,paymentMethod" json:"payment_method"`
	SalesItems     []salesSubsDTO.SaleItemDTO `validate:"required,gt=0,dive" json:"sales_items"`
}

type QuerySaleItemDTO

type QuerySaleItemDTO struct {
	appDto.PaginationDTO
	SaleID       string `validate:"omitempty,uuid" json:"sale_id" query:"sale_id" `
	ProductID    string `validate:"omitempty,uuid" json:"product_id" query:"product_id" `
	CreatedMonth int    `validate:"omitempty,min=1,max=12" query:"created_month" pg:"operation=equal,date_extract=MONTH,name=sale_items.created_at" `
	CreatedYear  int    `validate:"omitempty,number" query:"created_year" pg:"operation=equal,date_extract=YEAR,name=sale_items.created_at" `
	Order        string `validate:"omitempty" json:"order" query:"order"`
	Status       string `validate:"omitempty,status" json:"status" query:"status" pg:"name=sales.status"`
}

type QuerySaleItemsDTO

type QuerySaleItemsDTO struct {
	SaleID string `validate:"required,uuid" json:"sale_id" query:"sale_id" pg:"operation=equal"`
}

type QuerySalesDTO

type QuerySalesDTO struct {
	appDto.PaginationDTO
	CustomerCareID string `validate:"omitempty,uuid" query:"customer_care_id" pg:"operation=equal"`
	Status         string `validate:"omitempty,status" query:"status" pg:"operation=equal"`
	PaymentMethod  string `validate:"omitempty,paymentMethod" query:"payment_method" pg:"operation=equal"`
	Order          string `validate:"omitempty" json:"order" query:"order"`
}

type QuerySalesProductSummaryDTO

type QuerySalesProductSummaryDTO struct {
	appDto.PaginationDTO
	SaleID       string `validate:"omitempty,uuid" json:"sale_id" query:"sale_id" `
	ProductID    string `validate:"omitempty,uuid" json:"product_id" query:"product_id" `
	Status       string `validate:"omitempty,status" json:"status" query:"status" pg:"name=sales.status"`
	CreatedMonth int    `validate:"omitempty,min=1,max=12" query:"created_month" pg:"operation=equal,date_extract=MONTH,name=sale_items.created_at" `
	CreatedYear  int    `validate:"omitempty,number" query:"created_year" pg:"operation=equal,date_extract=YEAR,name=sale_items.created_at" `
}

type QueryTotalSalesSoldDTO

type QueryTotalSalesSoldDTO struct {
	appDto.PaginationDTO
	StartDate time.Time `validate:"omitempty" json:"start_date" query:"start_date"`
	EndDate   time.Time `validate:"omitempty" json:"end_date" query:"end_date"`
}

type UpdateSaleDTO

type UpdateSaleDTO struct {
	Transition string `validate:"required" json:"transition"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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