Skip to content
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

account store #22

Closed
wants to merge 28 commits into from
Closed

account store #22

wants to merge 28 commits into from

Conversation

Ficica
Copy link
Contributor

@Ficica Ficica commented Jan 22, 2020

account store functions

)

type AccountStore interface {
InsertAccount(userId int, balance float64, currency string, createdAt time.Time, updatedAt time.Time) (*entities.Account, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@F1c1cA don't pass createdAt and updatedAt as arguments, create them inside the method.

type AccountStore interface {
InsertAccount(userId int, balance float64, currency string) (*entities.Account, error)
GetAccountsByUserId(userId int) ([]*entities.Account, error)
UpdateAccount(id int, userId int, balance float64, currency string, updatedAt time.Time) (*entities.Account, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@F1c1cA you can remove updatedAt as an argument here, since it's not used.

InsertAccount(userId int, balance float64, currency string) (*entities.Account, error)
GetAccountsByUserId(userId int) ([]*entities.Account, error)
UpdateAccount(id int, userId int, balance float64, currency string, updatedAt time.Time) (*entities.Account, error)
CloseAccount(id int, userId int, updatedAt time.Time) (*entities.Account, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@F1c1cA here as well.

@Ficica Ficica closed this Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants