22 lines
819 B
Go
22 lines
819 B
Go
package requests
|
|
|
|
import "encoding/json"
|
|
|
|
type CreateComponentRequest struct {
|
|
ComponentTypeID int64 `json:"componentTypeId" binding:"required"`
|
|
Name string `json:"name" binding:"required"`
|
|
Description string `json:"description"`
|
|
Unit string `json:"unit" binding:"required"`
|
|
MinQuantity int32 `json:"minQuantity" binding:"required"`
|
|
Metadata json.RawMessage `json:"metadata"`
|
|
}
|
|
|
|
type UpdateComponentRequest struct {
|
|
ComponentTypeID int64 `json:"componentTypeId"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
Unit string `json:"unit"`
|
|
MinQuantity int32 `json:"minQuantity"`
|
|
Metadata json.RawMessage `json:"metadata"`
|
|
}
|