mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 05:21:57 +00:00
33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type PurchaseItem struct {
|
|
Id uint `gorm:"primaryKey;autoIncrement"`
|
|
PurchaseId uint `gorm:"not null"`
|
|
ProductId uint `gorm:"not null"`
|
|
WarehouseId uint `gorm:"not null"`
|
|
ProductWarehouseId *uint
|
|
ProjectFlockKandangId *uint
|
|
ReceivedDate *time.Time
|
|
TravelNumber *string
|
|
TravelNumberDocs *string
|
|
VehicleNumber *string
|
|
SubQty float64 `gorm:"type:numeric(15,3);not null"`
|
|
TotalQty float64 `gorm:"type:numeric(15,3);default:0"`
|
|
TotalUsed float64 `gorm:"type:numeric(15,3);default:0"`
|
|
Price float64 `gorm:"type:numeric(15,3);default:0"`
|
|
TotalPrice float64 `gorm:"type:numeric(15,3);default:0"`
|
|
ExpenseNonstockId *uint64
|
|
HasChickin bool `gorm:"-" json:"-"`
|
|
|
|
// Relations
|
|
ExpenseNonstock *ExpenseNonstock `gorm:"foreignKey:ExpenseNonstockId;references:Id"`
|
|
Purchase *Purchase `gorm:"foreignKey:PurchaseId;references:Id"`
|
|
Product *Product `gorm:"foreignKey:ProductId;references:Id"`
|
|
Warehouse *Warehouse `gorm:"foreignKey:WarehouseId;references:Id"`
|
|
ProductWarehouse *ProductWarehouse `gorm:"foreignKey:ProductWarehouseId;references:Id"`
|
|
}
|