mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
26 lines
1.1 KiB
Go
26 lines
1.1 KiB
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type MarketingProduct struct {
|
|
Id uint `gorm:"primaryKey;autoIncrement"`
|
|
MarketingId uint `gorm:"not null"`
|
|
ProductWarehouseId uint `gorm:"not null"`
|
|
Qty float64 `gorm:"type:numeric(15,3);not null"`
|
|
UnitPrice float64 `gorm:"type:numeric(15,3);not null"`
|
|
AvgWeight float64 `gorm:"type:numeric(15,3);not null"`
|
|
TotalWeight float64 `gorm:"type:numeric(15,3);not null"`
|
|
TotalPrice float64 `gorm:"type:numeric(15,3);not null"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
|
|
|
Marketing Marketing `gorm:"foreignKey:MarketingId;references:Id"`
|
|
ProductWarehouse ProductWarehouse `gorm:"foreignKey:ProductWarehouseId;references:Id"`
|
|
DeliveryProducts []MarketingDeliveryProduct `gorm:"foreignKey:MarketingProductId;references:Id"`
|
|
}
|