Update Customer Registration
This commit is contained in:
parent
40b5ab5964
commit
b5d6f7ff5b
@ -8,6 +8,7 @@ type CustomerResolutionRequest struct {
|
|||||||
Email string
|
Email string
|
||||||
PhoneNumber string
|
PhoneNumber string
|
||||||
BirthDate time.Time
|
BirthDate time.Time
|
||||||
|
Password string
|
||||||
}
|
}
|
||||||
|
|
||||||
type CustomerCheckResponse struct {
|
type CustomerCheckResponse struct {
|
||||||
|
|||||||
@ -135,5 +135,6 @@ func (r *memberRepository) toDomainRegistrationModel(dbModel *models.MemberRegis
|
|||||||
UpdatedAt: dbModel.UpdatedAt,
|
UpdatedAt: dbModel.UpdatedAt,
|
||||||
BranchID: dbModel.BranchID,
|
BranchID: dbModel.BranchID,
|
||||||
CashierID: dbModel.CashierID,
|
CashierID: dbModel.CashierID,
|
||||||
|
Password: dbModel.Password,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,6 +95,7 @@ func (s *memberSvc) VerifyOTP(
|
|||||||
Email: registration.Email,
|
Email: registration.Email,
|
||||||
PhoneNumber: registration.Phone,
|
PhoneNumber: registration.Phone,
|
||||||
BirthDate: registration.BirthDate,
|
BirthDate: registration.BirthDate,
|
||||||
|
Password: registration.Password,
|
||||||
}
|
}
|
||||||
|
|
||||||
customerID, err := s.customerSvc.ResolveCustomer(ctx, customerResolution)
|
customerID, err := s.customerSvc.ResolveCustomer(ctx, customerResolution)
|
||||||
|
|||||||
@ -113,6 +113,7 @@ func (s *customerSvc) ResolveCustomer(ctx mycontext.Context, req *entity.Custome
|
|||||||
UpdatedAt: constants.TimeNow(),
|
UpdatedAt: constants.TimeNow(),
|
||||||
CustomerID: utils.GenerateMemberID(ctx, 1, lastSeq),
|
CustomerID: utils.GenerateMemberID(ctx, 1, lastSeq),
|
||||||
BirthDate: req.BirthDate,
|
BirthDate: req.BirthDate,
|
||||||
|
Password: req.Password,
|
||||||
}
|
}
|
||||||
|
|
||||||
customer, err := s.repo.Create(ctx, newCustomer)
|
customer, err := s.repo.Create(ctx, newCustomer)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user