-
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
account store #22
account store #22
Conversation
BankAccount/pkg/store/account.go
Outdated
) | ||
|
||
type AccountStore interface { | ||
InsertAccount(userId int, balance float64, currency string, createdAt time.Time, updatedAt time.Time) (*entities.Account, error) |
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.
@F1c1cA don't pass createdAt and updatedAt as arguments, create them inside the method.
…ns into account-store
…ns into account-store
…interns into account-store-test
…interns into account-store
BankAccount/pkg/store/account.go
Outdated
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) |
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.
@F1c1cA you can remove updatedAt
as an argument here, since it's not used.
BankAccount/pkg/store/account.go
Outdated
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) |
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.
@F1c1cA here as well.
account store functions