1 /* 2 * Copyright 2017-2018 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef MYMONEYSTORAGENAMES_H 19 #define MYMONEYSTORAGENAMES_H 20 21 // ---------------------------------------------------------------------------- 22 // QT Includes 23 24 #include <QHash> 25 26 // ---------------------------------------------------------------------------- 27 // Project Includes 28 29 enum class Tag { 30 Institutions, 31 Payees, 32 CostCenters, 33 Tags, 34 Accounts, 35 Transactions, 36 Schedules, 37 Securities, 38 Currencies, 39 Prices, 40 Reports, 41 Budgets, 42 OnlineJobs, 43 KMMFile, 44 FileInfo, 45 User 46 }; 47 48 enum class Node { 49 Institution, 50 Payee, 51 CostCenter, 52 Tag, 53 Account, 54 Transaction, 55 Split, 56 ScheduleTX, 57 Security, 58 Currency, 59 Price, 60 PricePair, 61 Report, 62 Budget, 63 OnlineJob, 64 KeyValuePairs, 65 Equity 66 }; 67 68 namespace Element { 69 enum class General { 70 Address, 71 CreationDate, 72 LastModifiedDate, 73 Version, 74 FixVersion, 75 Pair 76 }; 77 78 enum class Transaction { 79 Split = 0, 80 Splits 81 }; 82 83 enum class Split { 84 Split = 0, 85 Tag, 86 Match, 87 Container, 88 KeyValuePairs 89 }; 90 91 enum class Account { 92 SubAccount, 93 SubAccounts, 94 OnlineBanking 95 }; 96 97 enum class Payee { 98 Address, 99 Identifier 100 }; 101 102 enum class KVP { 103 Pair 104 }; 105 106 enum class Institution { 107 AccountID, 108 AccountIDS, 109 Address 110 }; 111 112 enum class Schedule { 113 Payment, 114 Payments 115 }; 116 117 enum class OnlineJob { 118 OnlineTask 119 }; 120 } 121 122 namespace Attribute { 123 enum class General { 124 ID = 0, 125 Date, 126 Count, 127 From, 128 To, 129 Source, 130 Key, 131 Value, 132 Price, 133 Name, 134 Email, 135 Country, 136 City, 137 ZipCode, 138 Street, 139 Telephone, 140 // insert new entries above this line 141 LastAttribute 142 }; 143 144 enum class Transaction { 145 Name = 0, 146 Type, 147 PostDate, 148 Memo, 149 EntryDate, 150 Commodity, 151 BankID, 152 // insert new entries above this line 153 LastAttribute 154 }; 155 156 enum class Split { 157 ID = 0, 158 BankID, 159 Account, 160 Payee, 161 Tag, 162 Number, 163 Action, 164 Value, 165 Shares, 166 Price, 167 Memo, 168 CostCenter, 169 ReconcileDate, 170 ReconcileFlag, 171 KMMatchedTx, 172 // insert new entries above this line 173 LastAttribute 174 }; 175 176 enum class Account { 177 ID = 0, 178 Name, 179 Type, 180 ParentAccount, 181 LastReconciled, 182 LastModified, 183 Institution, 184 Opened, 185 Number, 186 Description, 187 Currency, 188 OpeningBalance, 189 IBAN, 190 BIC, 191 // insert new entries above this line 192 LastAttribute 193 }; 194 195 enum class Payee { 196 ID = 0, 197 Name, 198 Type, 199 Reference, 200 Notes, 201 MatchingEnabled, 202 UsingMatchKey, 203 MatchIgnoreCase, 204 MatchKey, 205 DefaultAccountID, 206 Street, 207 City, 208 PostCode, 209 Email, 210 State, 211 Telephone, 212 IBAN, 213 BIC, 214 OwnerVer1, 215 OwnerVer2, 216 BankCode, 217 Country, 218 AccountNumber, 219 // insert new entries above this line 220 LastAttribute 221 }; 222 223 enum class Tag { 224 ID = 0, 225 Name, 226 Type, 227 TagColor, 228 Closed, 229 Notes, 230 // insert new entries above this line 231 LastAttribute 232 }; 233 234 enum class Security { 235 ID = 0, 236 Name, 237 Symbol, 238 Type, 239 RoundingMethod, 240 SAF, 241 PP, 242 SCF, 243 TradingCurrency, 244 TradingMarket, 245 // insert new entries above this line 246 LastAttribute 247 }; 248 249 enum class KVP { 250 Key, 251 Value, 252 // insert new entries above this line 253 LastAttribute 254 }; 255 256 enum class Institution { 257 ID = 0, 258 Name, 259 Manager, 260 SortCode, 261 Street, 262 City, 263 Zip, 264 Telephone, 265 // insert new entries above this line 266 LastAttribute 267 }; 268 269 enum class Schedule { 270 ID = 0, 271 Name, 272 Type, 273 Occurrence, 274 OccurrenceMultiplier, 275 PaymentType, 276 Fixed, 277 AutoEnter, 278 LastPayment, 279 WeekendOption, 280 Date, 281 StartDate, 282 EndDate, 283 LastDayInMonth, 284 // insert new entries above this line 285 LastAttribute 286 }; 287 288 enum class OnlineJob { 289 ID = 0, 290 Send, 291 BankAnswerDate, 292 BankAnswerState, 293 IID, 294 AbortedByUser, 295 AcceptedByBank, 296 RejectedByBank, 297 SendingError, 298 // insert new entries above this line 299 LastAttribute 300 }; 301 302 enum class CostCenter { 303 ID = 0, 304 Name, 305 // insert new entries above this line 306 LastAttribute 307 }; 308 } 309 310 QString elementName(Element::General elementID); 311 QString attributeName(Attribute::General attributeID); 312 313 QString elementName(Element::Transaction elementID); 314 QString attributeName(Attribute::Transaction attributeID); 315 316 QString elementName(Element::Split elementID); 317 QString attributeName(Attribute::Split attributeID); 318 319 QString elementName(Element::Account elementID); 320 QString attributeName(Attribute::Account attributeID); 321 322 QString elementName(Element::Payee elementID); 323 QString attributeName(Attribute::Payee attributeID); 324 325 QString attributeName(Attribute::Tag attributeID); 326 327 QString attributeName(Attribute::Security attributeID); 328 329 QString elementName(Element::KVP elementID); 330 QString attributeName(Attribute::KVP attributeID); 331 332 QString elementName(Element::Institution elementID); 333 QString attributeName(Attribute::Institution attributeID); 334 335 QString elementName(Element::Schedule elementID); 336 QString attributeName(Attribute::Schedule attributeID); 337 338 QString elementName(Element::OnlineJob elementID); 339 QString attributeName(Attribute::OnlineJob attributeID); 340 341 QString attributeName(Attribute::CostCenter attributeID); 342 343 QString tagName(Tag tagID); 344 QString nodeName(Node nodeID); 345 346 #endif 347