-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add customerId in user table #9
Conversation
EliasFernandes03
commented
Jan 12, 2024
•
edited
Loading
edited
- Creating a new field customerId to save the stripe customer's Id
- Implementing new service for update CustomerId
src/users/validationUserModel.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
não faltou atualizar validationDbUsers.ts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O validationDbUsers.ts é uma validação com os campos required, o bruno e eu estamos pensando na possibilidade de que o cadastro da stripe possa não acontecer, nesse caso o nosso cadastro não seria impactado. Quando o usuario se cadastrar na stripe de fato , ele atualiza a tabela do users com o campo customerId.
src/interfaces.ts
Outdated
@@ -15,6 +15,7 @@ export interface IUsers { | |||
complement: string | |||
quota: UserQuota | |||
validatedMail: boolean | |||
customerId: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esse campo tá ambíguo.. oq é customerID?
se for um campo referente a pagamento, usar algo como paymentServiceCustomerId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concordo com o Marcus. É bom deixar claro que é um id referente ao serviço de um terceiro
…form-db into feat/StripeIntegration