Commit Graph

72 Commits

Author SHA1 Message Date
2566ec8eaa Add CANT_FIND_CURRENCY error to db.go and fix problem when initCurrencies returned CANT_FIND_METRIC 2024-12-01 13:22:41 +02:00
282339e7af Remame db.Metric.Value to db.Metric.Type 2024-12-01 13:20:52 +02:00
e83cf56126 Add consts.go to db package and move all Metric values to consts.go 2024-12-01 12:37:29 +02:00
03fa9ff9bc Add db.SettingsTypeFilter struct to db package 2024-11-30 16:36:55 +02:00
e6d53c4d17 Add BeforeSave hook to db.Payment 2024-11-28 13:42:59 +02:00
994f623f23 Rename ERROR_EXPENSE_INVALID_USERID -> ERROR_EXPENSE_INVALID_CARD_USERID 2024-11-28 13:40:10 +02:00
f221480b2c Add marker for Hepler_ExpenseBulk.CreateExpenseFromChild to sweep it under the rug 2024-11-28 13:39:43 +02:00
fc2b066c12 Fix issue when creating root category for new user
sq
2024-11-27 21:58:47 +02:00
4d66637d3e Change name of database file 2024-11-27 09:57:41 +02:00
3e8f56eb0a Add bulk creation of expencies 2024-11-27 07:39:23 +02:00
4199603be3 Add situation when transfer will be from one currency on the card to different currency 2024-11-24 00:26:02 +02:00
4522d4450f Add LastDigits and binding to currency for cards 2024-11-20 20:59:48 +02:00
05b5059477 Change RON symbol to be RL 2024-11-20 20:45:56 +02:00
f4cad689d8 Add ExchangeRate entity to database 2024-11-20 19:19:48 +02:00
5f35b57eb4 Remove logs from expense.go in db package 2024-11-20 19:19:17 +02:00
33ffa6275b Change initMetrics seeding to use new generic function and add seeding for Currencies 2024-11-20 18:46:07 +02:00
d929492e3d Add implementation for Identifiable interface for Metric entity 2024-11-20 18:45:23 +02:00
579bb031c7 Change Identifiable interface to only use GetID() uint function 2024-11-20 18:44:44 +02:00
d41e6301e5 Add Currency entity to database 2024-11-20 18:44:23 +02:00
9cd9b20163 Add db hooks for Item 2024-11-20 18:19:19 +02:00
81b379afbd Add Paymenr Item and ItemBought as entities in PaymentGroup for db interface resolution 2024-11-20 18:19:12 +02:00
4244e397f3 Set CASCADE deletion for ItemBought from Payment after deletion 2024-11-20 18:18:29 +02:00
dbe140ecaf Set CASCADE delete for ItemPrice from Item deletion 2024-11-20 18:17:45 +02:00
b5747c9d9d Add Price field for Item 2024-11-20 18:17:21 +02:00
bd2005bf5d Add PaymentGroup to intf.go in db package 2024-11-20 18:17:03 +02:00
8855cc3e54 Add db seeding with default metrics for users 2024-11-19 10:13:02 +02:00
06b317511d Add Metric entity to database schema 2024-11-19 10:12:28 +02:00
602b3da13b Add implementation for db.UserIdentifiable for Income 2024-11-18 19:38:23 +02:00
b9cfa2004a Fix issue with updating expense value for the same card 2024-11-18 19:07:11 +02:00
3b3a8b13d6 Add implementation for db.UserIdentifiable for Item 2024-11-18 09:51:46 +02:00
66f83cf3aa Add implementation of db.UserIdentifiable for db.Transfer and add db hooks 2024-11-16 20:31:18 +02:00
7b461ce985 Fix expense error in AfterDelete hook 2024-11-16 20:30:47 +02:00
893f2aa365 Add Expense entity to database 2024-11-16 11:42:28 +02:00
22007ef38e Add SelfReferencing check in Category database BeforeSave hook 2024-11-11 22:26:47 +02:00
8a7d52efda Fix Parent finding issue with BeforeSave hook and duplicate finding error for category 2024-11-11 22:26:21 +02:00
ad25c69c79 Redirect db log into db.log file 2024-11-08 17:05:23 +02:00
e9ad95821e Add db.Session type 2024-11-06 19:47:12 +02:00
7f4067ce31 Add implemetation for db.UserIdentifiable interface for Debt entity 2024-11-02 00:05:28 +02:00
45123613fd Add User binding to paymets 2024-11-01 22:54:29 +02:00
2eb7ccdaf4 Remove IsValid and add ValidTo field for ItemPrice entity 2024-11-01 22:54:11 +02:00
6c70cc1881 Rename Name for Payment to Title 2024-11-01 09:30:51 +02:00
e2d3d636cb Add TotalCost MetricValue MetricType and Type relationship to ItemBought 2024-11-01 09:30:34 +02:00
48f7b8258e Add Item-Type relationship 2024-11-01 09:30:01 +02:00
02a33aaced Move Comment in Item above Metric fields 2024-11-01 09:29:48 +02:00
de7926337a Change db.Card.Value to db.Card.Balance and types.DbCard.Value to types.DbCard.Balance 2024-11-01 09:26:37 +02:00
faa2bf7a9e Add implementation for db.UserIdentifiable for Category 2024-10-31 23:05:38 +02:00
6b339e7496 Rephrase ERROR_CATEGORY_PARENT_NOT_FOUND error in db package 2024-10-31 23:05:18 +02:00
020a5e6e40 Add implemetation for db.UserIdentifiable for type in db package 2024-10-31 11:11:39 +02:00
7d1ca772c0 Add BeforeSave hook for type for duplicate detection 2024-10-31 11:09:11 +02:00
255f812078 Add clarity to cards errors 2024-10-31 11:05:06 +02:00