cargo-platform/internal/handlers/dto/province.go
teguh nugroho fc0d140c5c
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
import province
2026-08-17 18:39:41 +07:00

39 lines
1.0 KiB
Go

package dto
type CreateProvinceRequest struct {
Name string `json:"name" binding:"required,min=2"`
}
type CreateProvinceResponse struct {
ID string `json:"id"`
Name *string `json:"name"`
MerchantID *string `json:"merchant_id"`
}
type ProvinceFilterAllRequest struct {
ID string `json:"id" form:"id"`
Name string `json:"name" form:"name"`
MerchantID string `json:"merchant_id" form:"merchant_id"`
}
type UpdateProvinceRequest struct {
Name string `json:"name" binding:"required,min=2"`
}
type ImportLog struct {
Row int `json:"row"`
Status string `json:"status"`
Data string `json:"data"`
Message string `json:"message"`
}
type ImportProvinceResponse 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"`
}