mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 23:35:43 +00:00
feat(BE-34): extend DB schema and update master data APIs [partial]
✅ DB Schema: product_warehouse entity and migration ✅ Master Data: added filter params to getall APIs 🚧 Pending: stock_logs implementation and adjustment APIs
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
package validation
|
||||
|
||||
type Create struct {
|
||||
ProductId uint `json:"product_id" validate:"required,number,min=1"`
|
||||
WarehouseId uint `json:"warehouse_id" validate:"required,number,min=1"`
|
||||
Quantity int `json:"quantity" validate:"required,number,min=0"`
|
||||
}
|
||||
|
||||
type Update struct {
|
||||
ProductId *uint `json:"product_id,omitempty" validate:"omitempty,number,min=1"`
|
||||
WarehouseId *uint `json:"warehouse_id,omitempty" validate:"omitempty,number,min=1"`
|
||||
Quantity *int `json:"quantity,omitempty" validate:"omitempty,number,min=0"`
|
||||
}
|
||||
|
||||
type Query struct {
|
||||
Page int `query:"page" validate:"omitempty,number,min=1"`
|
||||
Limit int `query:"limit" validate:"omitempty,number,min=1,max=100"`
|
||||
Search string `query:"search" validate:"omitempty,max=50"`
|
||||
ProductId uint `query:"product_id" validate:"omitempty,number,min=1"`
|
||||
WarehouseId uint `query:"warehouse_id" validate:"omitempty,number,min=1"`
|
||||
}
|
||||
Reference in New Issue
Block a user