mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
9b016dc30a
- Extend DB schema for stock transfers - Build stock transfer API (create,)
23 lines
717 B
Go
23 lines
717 B
Go
package entities
|
|
|
|
import "time"
|
|
|
|
// HEADER
|
|
type StockTransfer struct {
|
|
Id uint64 `gorm:"primaryKey;autoIncrement"`
|
|
MovementNumber string `gorm:"uniqueIndex;not null"`
|
|
FromWarehouseId uint64
|
|
ToWarehouseId uint64
|
|
TransferDate time.Time
|
|
Reason string
|
|
CreatedBy uint64
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
DeletedAt *time.Time `gorm:"index"`
|
|
// Relations
|
|
FromWarehouse *Warehouse `gorm:"foreignKey:FromWarehouseId"`
|
|
ToWarehouse *Warehouse `gorm:"foreignKey:ToWarehouseId"`
|
|
Details []StockTransferDetail `gorm:"foreignKey:StockTransferId"`
|
|
Deliveries []StockTransferDelivery `gorm:"foreignKey:StockTransferId"`
|
|
}
|