mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
FEAT[BE] :add marketing type and conversion fields to marketing entities and services
This commit is contained in:
@@ -14,6 +14,7 @@ type Marketing struct {
|
||||
SoDate time.Time `gorm:"type:date;not null"`
|
||||
SalesPersonId uint `gorm:"not null"`
|
||||
Notes string `gorm:"type:text"`
|
||||
MarketingType string `gorm:"type:varchar(50)"`
|
||||
CreatedBy uint `gorm:"not null"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package entities
|
||||
|
||||
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"`
|
||||
Id uint `gorm:"primaryKey;autoIncrement"`
|
||||
MarketingId uint `gorm:"not null"`
|
||||
ProductWarehouseId uint `gorm:"not null"`
|
||||
Qty float64 `gorm:"type:numeric(15,3);not null"`
|
||||
ConvertionUnit *string `gorm:"type:varchar(20)"`
|
||||
WeightPerConvertion *float64 `gorm:"type:numeric(15,3)"`
|
||||
Week *int `gorm:"type:integer"`
|
||||
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"`
|
||||
|
||||
Marketing Marketing `gorm:"foreignKey:MarketingId;references:Id"`
|
||||
ProductWarehouse ProductWarehouse `gorm:"foreignKey:ProductWarehouseId;references:Id"`
|
||||
|
||||
Reference in New Issue
Block a user