add notes
This commit is contained in:
@@ -40,6 +40,7 @@ type OrderItemDB struct {
|
||||
CreatedBy int64 `gorm:"column:created_by"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
Product ProductDB `gorm:"foreignKey:ItemID;references:ID"`
|
||||
Notes string `gorm:"column:notes"`
|
||||
}
|
||||
|
||||
func (OrderItemDB) TableName() string {
|
||||
@@ -83,6 +84,7 @@ type InquiryItemDB struct {
|
||||
Quantity int `gorm:"column:quantity"`
|
||||
CreatedBy int64 `gorm:"column:created_by"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
Notes string `gorm:"column:notes"`
|
||||
}
|
||||
|
||||
func (InquiryItemDB) TableName() string {
|
||||
|
||||
@@ -148,6 +148,7 @@ func (r *orderRepository) CreateInquiry(ctx mycontext.Context, inquiry *entity.O
|
||||
Quantity: item.Quantity,
|
||||
CreatedBy: item.CreatedBy,
|
||||
CreatedAt: time.Now(),
|
||||
Notes: item.Notes,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -202,6 +203,7 @@ func (r *orderRepository) FindInquiryByID(ctx mycontext.Context, id string) (*en
|
||||
Quantity: itemDB.Quantity,
|
||||
CreatedBy: itemDB.CreatedBy,
|
||||
CreatedAt: itemDB.CreatedAt,
|
||||
Notes: itemDB.Notes,
|
||||
})
|
||||
}
|
||||
inquiry.OrderItems = orderItems
|
||||
@@ -264,6 +266,7 @@ func (r *orderRepository) toDomainOrderModel(dbModel *models.OrderDB) *entity.Or
|
||||
Quantity: itemDB.Quantity,
|
||||
CreatedBy: itemDB.CreatedBy,
|
||||
CreatedAt: itemDB.CreatedAt,
|
||||
Notes: itemDB.Notes,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -300,6 +303,7 @@ func (r *orderRepository) toOrderItemDBModel(item *entity.OrderItem) models.Orde
|
||||
Quantity: item.Quantity,
|
||||
CreatedBy: item.CreatedBy,
|
||||
CreatedAt: item.CreatedAt,
|
||||
Notes: item.Notes,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user