expand orders #75

Open
goc_daniel wants to merge 3 commits from expand_orders into main
Owner
  • bugfix in auth.go
  • added fields BasePrice, TaxIncl, TaxExcl, UpdatedAt, CreatedAt
- bugfix in auth.go - added fields BasePrice, TaxIncl, TaxExcl, UpdatedAt, CreatedAt
goc_daniel added 1 commit 2026-04-16 09:49:08 +00:00
goc_daniel requested review from dudzic_wiktor 2026-04-16 13:00:19 +00:00
goc_daniel removed review request for dudzic_wiktor 2026-04-16 13:00:46 +00:00
goc_daniel added 2 commits 2026-04-16 13:02:42 +00:00
goc_daniel requested review from dudzic_wiktor 2026-04-16 13:03:38 +00:00
dudzic_wiktor requested changes 2026-04-16 13:22:21 +00:00
@@ -106,3 +115,3 @@
Table("b2b_customer_orders").
Where("order_id = ?", order_id).
Update("status", status).
Updates(map[string]interface{}{
Collaborator

this code is fine but just letting you know that when you use DB.Model() instead of DB.Table the updated_at columns is being updated by gorm automatically

this code is fine but just letting you know that when you use DB.Model() instead of DB.Table the updated_at columns is being updated by gorm automatically
@@ -130,6 +130,7 @@ func (s *AuthService) Login(req *model.LoginRequest) (*model.AuthResponse, strin
user.LangID = *req.LangID
}
user.Country = nil
Collaborator

db shouldn't be called in the service and updating logic should be in single place in repo. that way we don't have to rely on remembering to nullify associated models like country.

Best approach would be to build a Customer model out of a DTO for this operation for the sake of safety.
But the customer struct is small enough that nullifying Country and Role would be sufficient for now.

db shouldn't be called in the service and updating logic should be in single place in repo. that way we don't have to rely on remembering to nullify associated models like country. Best approach would be to build a Customer model out of a DTO for this operation for the sake of safety. But the customer struct is small enough that nullifying Country and Role would be sufficient for now.
This pull request doesn't have enough required approvals yet. 0 of 1 official approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin expand_orders:expand_orders
git checkout expand_orders
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: goc_daniel/b2b#75