Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework db model usage to use new model interface #412

Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fdf36e7
Rework model-getter helper
ZIMkaRU Aug 30, 2024
cde57c5
Rework model-map-getter helper
ZIMkaRU Aug 30, 2024
e5eb898
Rework movements service to use new model interface
ZIMkaRU Aug 30, 2024
143bfbe
Rework performingLoan service to use new model interface
ZIMkaRU Aug 30, 2024
766a91f
Rework positionsSnapshot service to use new model interface
ZIMkaRU Aug 30, 2024
29ff945
Rework summaryByAsset service to use new model interface
ZIMkaRU Aug 30, 2024
8465b60
Rework totalFeesReport service to use new model interface
ZIMkaRU Aug 30, 2024
ae9ccdb
Rework trades service to use new model interface
ZIMkaRU Aug 30, 2024
5a0cde1
Rework transactionTaxReport service to use new model interface
ZIMkaRU Aug 30, 2024
272e84d
Rework weightedAveragesReport service to use new model interface
ZIMkaRU Aug 30, 2024
a51d05c
Clone sync schema keeping initial model instance
ZIMkaRU Sep 2, 2024
d65c6e3
Add getter for model field keys to model class
ZIMkaRU Sep 2, 2024
39cafa9
Add method to check model has field name
ZIMkaRU Sep 2, 2024
ba19eec
Use model interface to get query
ZIMkaRU Sep 2, 2024
fc9ed3a
Use model interface to get projection
ZIMkaRU Sep 2, 2024
7863f80
Use model interface to get filter query
ZIMkaRU Sep 2, 2024
06b7604
Use model interface in sync user step manager
ZIMkaRU Sep 3, 2024
a239d05
Use model interface to normalize api data
ZIMkaRU Sep 3, 2024
3fcef11
Use model interface in data inserter
ZIMkaRU Sep 3, 2024
c005a68
Rework dao models map getter
ZIMkaRU Sep 3, 2024
0d955f0
Rework dao table creation method
ZIMkaRU Sep 3, 2024
0b31a9d
Use model interface to get table creation query
ZIMkaRU Sep 3, 2024
0c8e554
Add getter for model instance to dao
ZIMkaRU Sep 4, 2024
7d25c40
Use model interface to move temp table data to main
ZIMkaRU Sep 4, 2024
ff5412b
Use model interface to get trigger creation query
ZIMkaRU Sep 4, 2024
8a35123
Rework dao trigger creation method
ZIMkaRU Sep 4, 2024
5d96e96
Use model interface to get index creation query
ZIMkaRU Sep 4, 2024
0a749a2
Rework dao index creation method
ZIMkaRU Sep 4, 2024
02b3791
Fix model map getter
ZIMkaRU Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rework summaryByAsset service to use new model interface
  • Loading branch information
ZIMkaRU committed Sep 6, 2024
commit 29ff9458b6272f0cb85126baf27deeb2062ea0fb
7 changes: 4 additions & 3 deletions workers/loc.api/sync/summary.by.asset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ class SummaryByAsset {

this.ledgersMethodColl = this.syncSchema.getMethodCollMap()
.get(this.SYNC_API_METHODS.LEDGERS)
this.ledgersModel = this.syncSchema.getModelsMap()
.get(this.ALLOWED_COLLS.LEDGERS)
this.ledgersModelFields = this.syncSchema
.getModelOf(this.ALLOWED_COLLS.LEDGERS)
.getModelFields()
this.ledgersSymbolFieldName = this.ledgersMethodColl.symbolFieldName
}

Expand Down Expand Up @@ -269,7 +270,7 @@ class SummaryByAsset {
user_id: auth._id
},
sort: [['mts', 1], ['id', 1]],
projection: this.ledgersModel
projection: this.ledgersModelFields
}
)
}
Expand Down