update account_schema.go, repository.go
This commit is contained in:
1 parent
7493fd4885
commit
a7f3f5b795
2 files changed
+111
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"esaccount"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Account interface {
|
||||
CreateAccount(int64) (*esaccount.Account, error)
|
||||
SaveAccount(user *esaccount.Account) (int64, error)
|
||||
GetAccount(id int64) (*esaccount.Account, error)
|
||||
FindAccount(query, param string) (esaccount.Account, error)
|
||||
GetAccounts(start, limit int) []int64
|
||||
DeleteAccount(id int64) error
|
||||
GetAccountsCount() int64
|
||||
}
|
||||
|
||||
type Repository struct {
|
||||
Account
|
||||
}
|
||||
|
||||
func NewRepository(db *gorm.DB) *Repository {
|
||||
return &Repository{
|
||||
Account: NewAccountSchema(db),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user