cargo-platform/internal/handlers/dto/cost_component_group.go
teguh nugroho dc28c6f6fc
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
cost_component
2026-08-22 11:36:50 +07:00

43 lines
1.3 KiB
Go

package dto
type CreateCostComponentGroupRequest struct {
Name string `json:"name" binding:"required,min=2"`
Code string `json:"code" binding:"required"`
Inc int32 `json:"inc"`
Value string `json:"value"`
}
type CreateCostComponentGroupResponse struct {
ID string `json:"id"`
Name *string `json:"name"`
Code *string `json:"code"`
Inc *int32 `json:"inc"`
Value *string `json:"value"`
MerchantID *string `json:"merchant_id"`
}
type CostComponentGroupFilterAllRequest struct {
ID string `json:"id" form:"id"`
Name string `json:"name" form:"name"`
Code string `json:"code" form:"code"`
MerchantID string `json:"merchant_id" form:"merchant_id"`
}
type UpdateCostComponentGroupRequest struct {
Name string `json:"name" binding:"required,min=2"`
Code string `json:"code" binding:"required"`
Inc int32 `json:"inc"`
Value string `json:"value"`
}
type ImportCostComponentGroupResponse struct {
JobID string `json:"job_id,omitempty"`
TotalRows int `json:"total_rows"`
Imported int `json:"imported"`
Skipped int `json:"skipped"`
Logs []ImportLog `json:"logs"`
Errors []string `json:"errors"`
IsAsync bool `json:"is_async"`
Message string `json:"message,omitempty"`
}