cargo-platform/internal/handlers/dto/cost_component.go
teguh nugroho a0cd1f9a25
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
city change
2026-08-22 22:11:25 +07:00

38 lines
1.3 KiB
Go

package dto
type CreateCostComponentRequest struct {
Name string `json:"name" binding:"required,min=2"`
Code string `json:"code" binding:"required"`
Value string `json:"value" binding:"required"`
ComponentType int32 `json:"component_type" binding:""`
}
type CreateCostComponentResponse struct {
ID string `json:"id"`
Name *string `json:"name"`
Code *string `json:"code"`
Inc *int32 `json:"inc"`
Value *string `json:"value"`
ComponentType *int32 `json:"component_type"`
MerchantID *string `json:"merchant_id"`
}
type CostComponentFilterAllRequest struct {
ID string `json:"id" form:"id"`
Name string `json:"name" form:"name"`
Code string `json:"code" form:"code"`
ComponentType string `json:"component_type" form:"component_type"`
MerchantID string `json:"merchant_id" form:"merchant_id"`
}
type UpdateCostComponentRequest struct {
Name string `json:"name" binding:"required,min=2"`
Code string `json:"code" binding:"required"`
Value string `json:"value" binding:"required"`
ComponentType int32 `json:"component_type"`
}
type MatchCostComponentRequest struct {
ID string `json:"id" form:"id" binding:"required,len=26"`
}