18 lines
460 B
Go
18 lines
460 B
Go
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 `json:"created_at"`
|
|
}
|