-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaccount.go
61 lines (54 loc) · 955 Bytes
/
account.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package budget
import "github.com/pkg/errors"
var (
ErrAccountNotFound = errors.New("account not found")
)
type Account struct {
ID string
Name string
AccountType string
RequestType string
BankORG string
BankFID string
BankURL string
Sync bool
}
func (a Account) GetSQLTableName() string {
return "accounts"
}
type AccountChange struct {
Name *string
AccountType *string
RequestType *string
BankORG *string
BankFID *string
BankURL *string
Sync *bool
}
func (a AccountChange) IsEmpty() bool {
if a.Name != nil {
return false
}
if a.AccountType != nil {
return false
}
if a.RequestType != nil {
return false
}
if a.BankORG != nil {
return false
}
if a.BankFID != nil {
return false
}
if a.BankURL != nil {
return false
}
return true
}
type AccountSensitiveDetails struct {
AccountID string
BankID string
UserID string
UserPass string
}