diff --git a/accounts.go b/accounts.go index e77a08f..23eff8d 100644 --- a/accounts.go +++ b/accounts.go @@ -8,16 +8,14 @@ import ( "strings" ) -type AccountType int64 - const ( - Bank AccountType = 1 - Cash = 2 - Asset = 3 - Liability = 4 - Investment = 5 - Income = 6 - Expense = 7 + Bank int64 = 1 + Cash = 2 + Asset = 3 + Liability = 4 + Investment = 5 + Income = 6 + Expense = 7 ) type Account struct { @@ -25,7 +23,7 @@ type Account struct { UserId int64 SecurityId int64 ParentAccountId int64 // -1 if this account is at the root - Type AccountType + Type int64 Name string } diff --git a/securities.go b/securities.go index 6967079..b0760a5 100644 --- a/securities.go +++ b/securities.go @@ -6,13 +6,11 @@ import ( "net/http" ) -type SecurityType int64 - const ( - Banknote SecurityType = 1 - Bond = 2 - Stock = 3 - MutualFund = 4 + Banknote int64 = 1 + Bond = 2 + Stock = 3 + MutualFund = 4 ) type Security struct { @@ -21,7 +19,7 @@ type Security struct { // Number of decimal digits (to the right of the decimal point) this // security is precise to Precision int64 - Type SecurityType + Type int64 } type SecurityList struct {