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