add notes
This commit is contained in:
@@ -92,6 +92,7 @@ type OrderItem struct {
|
||||
Product *Product `gorm:"foreignKey:ItemID;references:ID"`
|
||||
ItemName string `gorm:"type:varchar;column:item_name"`
|
||||
Description string `gorm:"type:varchar;column:description"`
|
||||
Notes string `gorm:"type:varchar;column:notes"`
|
||||
}
|
||||
|
||||
func (OrderItem) TableName() string {
|
||||
@@ -118,6 +119,7 @@ type OrderItemRequest struct {
|
||||
ProductID int64 `json:"product_id" validate:"required"`
|
||||
Quantity int `json:"quantity" validate:"required"`
|
||||
Description string `json:"description"`
|
||||
Notes string `json:"notes"`
|
||||
}
|
||||
|
||||
type OrderExecuteRequest struct {
|
||||
|
||||
@@ -87,6 +87,7 @@ func (oi *OrderInquiry) AddOrderItem(item OrderItemRequest, product *Product) {
|
||||
Quantity: item.Quantity,
|
||||
CreatedBy: oi.CreatedBy,
|
||||
Product: product,
|
||||
Notes: item.Notes,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -122,6 +123,7 @@ func (i *OrderInquiry) ToOrder(paymentMethod, paymentProvider string) *Order {
|
||||
CreatedBy: i.CreatedBy,
|
||||
CreatedAt: now,
|
||||
Product: item.Product,
|
||||
Notes: item.Notes,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user