Commit Graph

177 Commits

Author SHA1 Message Date
957f1e8363 Update transfer handlers to show and use card transformer that will use currency transformer as well if their field is not nil 2024-11-24 00:28:22 +02:00
0f7b1b210a Add FromValue and ToValue to show for different currencies and some UI fields for easy front 2024-11-24 00:27:34 +02:00
4db167085a Add Currency and DisplayName to card handlers 2024-11-24 00:27:02 +02:00
4fc2b5f5bd Add displayName to types.DbCard 2024-11-24 00:26:33 +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
e1a46f5fc7 Update handler and types.DbCard to accept and send new fields 2024-11-20 21:00:17 +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
40ec90687a Add currency/all endpoint and handler 2024-11-20 20:29:00 +02:00
79eb50f375 Add types.DbCurrency to types package 2024-11-20 20:28:42 +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
cb60cb39d5 Add payment endpoint and handlers 2024-11-20 18:19:57 +02:00
3ce1c5c2d0 Change itemTransform function to use Item.Price directly 2024-11-20 18:19:43 +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
953394335b Remove DbPayment and add Payment instead to types package 2024-11-20 18:16:45 +02:00
a52b108bf8 Add metric /all endpoint and handler 2024-11-19 10:13:41 +02:00
f4342ba019 Add types.DbMetric type to types package 2024-11-19 10:13:19 +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
83f69a2135 Add /all endpoint and handler for income 2024-11-19 10:12:04 +02:00
9f7d93ed19 Fix issue with /add endpoint for income 2024-11-19 10:11:40 +02:00
21afd95d98 Refactor handlers/income.go 2024-11-18 19:38:44 +02:00
78d420e1d2 Remove UserID from types.DbIncome 2024-11-18 19:38:34 +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
ead0a4bd60 Add item routes 2024-11-18 09:55:34 +02:00
dd19718dc8 Add handlers for finding items 2024-11-18 09:55:27 +02:00
fff8c256d1 Add DbItem and DbItemSearch types to types package 2024-11-18 09:52:11 +02:00
3b3a8b13d6 Add implementation for db.UserIdentifiable for Item 2024-11-18 09:51:46 +02:00
a9a4f26528 Add routes for transfer 2024-11-16 20:31:36 +02:00
a47c75bb52 Add handlers for transfer 2024-11-16 20:31:31 +02:00
bf9628d1d7 Add types.DbTransfer 2024-11-16 20:31:25 +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
d230ee7cf2 Fix errors in swagger docs 2024-11-16 11:45:47 +02:00
18aad2c225 Add routes to handlers for expense group 2024-11-16 11:43:32 +02:00
2827a31fc9 Add Expense CRUD handlers 2024-11-16 11:43:11 +02:00
e26808e2f3 Add loging ShouldBindJSON error to console 2024-11-16 11:42:59 +02:00
137d343773 Add types.DbExpense 2024-11-16 11:42:43 +02:00
893f2aa365 Add Expense entity to database 2024-11-16 11:42:28 +02:00