feat: add stock movement on backend
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user