51 lines
1.4 KiB
Go
51 lines
1.4 KiB
Go
package models
|
|
|
|
// ProductGetResponse represents the response for GET products
|
|
type ProductGetResponse struct {
|
|
Message string `json:"message"`
|
|
Data interface{} `json:"data"`
|
|
}
|
|
|
|
// ProductGetByIDResponse represents the response for GET product by ID
|
|
type ProductGetByIDResponse struct {
|
|
ID string `json:"id"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
// ProductCreateRequest represents the request for creating product
|
|
type ProductCreateRequest struct {
|
|
Name string `json:"name" binding:"required"`
|
|
// Add more fields as needed
|
|
}
|
|
|
|
// ProductCreateResponse represents the response for creating product
|
|
type ProductCreateResponse struct {
|
|
ID string `json:"id"`
|
|
Message string `json:"message"`
|
|
Data interface{} `json:"data"`
|
|
}
|
|
|
|
// ProductUpdateRequest represents the request for updating product
|
|
type ProductUpdateRequest struct {
|
|
Name string `json:"name" binding:"required"`
|
|
// Add more fields as needed
|
|
}
|
|
|
|
// ProductUpdateResponse represents the response for updating product
|
|
type ProductUpdateResponse struct {
|
|
ID string `json:"id"`
|
|
Message string `json:"message"`
|
|
Data interface{} `json:"data"`
|
|
}
|
|
|
|
// ProductDeleteResponse represents the response for deleting product
|
|
type ProductDeleteResponse struct {
|
|
ID string `json:"id"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
// ErrorResponse represents an error response
|
|
// type ErrorResponse struct {
|
|
// Error string `json:"error"`
|
|
// }
|