backend moved to separate directory
backend: deleted the old structure
This commit is contained in:
20
go-backend/internal/repositories/banking_repository.go
Normal file
20
go-backend/internal/repositories/banking_repository.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"GoMembership/internal/database"
|
||||
"GoMembership/internal/models"
|
||||
)
|
||||
|
||||
type BankAccountRepositoryInterface interface {
|
||||
CreateBankAccount(account *models.BankAccount) (uint, error)
|
||||
}
|
||||
|
||||
type BankAccountRepository struct{}
|
||||
|
||||
func (repo *BankAccountRepository) CreateBankAccount(account *models.BankAccount) (uint, error) {
|
||||
result := database.DB.Create(account)
|
||||
if result.Error != nil {
|
||||
return 0, result.Error
|
||||
}
|
||||
return account.ID, nil
|
||||
}
|
||||
Reference in New Issue
Block a user