feat: add components management functionality
This commit is contained in:
21
internal/models/requests/component_request.go
Normal file
21
internal/models/requests/component_request.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user