feat: add stock movement on backend

This commit is contained in:
2026-06-26 16:57:36 +03:00
parent 846844a1f0
commit 7b662bb618
6 changed files with 140 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
package models
import (
"time"
)
type StockMovement struct {
ID uint `json:"id" gorm:"primaryKey"`
ItemID uint `json:"item_id"`
Item Item `json:"item" gorm:"foreignKey:ItemID"`
Type string `json:"type"`
Quantity float64 `json:"quantity"`
Reason string `json:"reason" gorm:"not null"`
OrderID *uint `json:"order_id"`
Comment string `json:"comment"`
CreatedAt time.Time
}