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

Add AccountsDatasource #1654

Merged
merged 3 commits into from
Jun 14, 2024
Merged

Add AccountsDatasource #1654

merged 3 commits into from
Jun 14, 2024

Conversation

iamacook
Copy link
Member

Summary

This adds a new datasource for accounts, implementing a basic database with tables for accounts and `groups:

  • accounts are address specific and containt an id, group_id and address column
  • groups are will be for defining "shared" accounts, currently only having an id

Leveraging the database is the IAccountsDatasource, containing two methods: createAccount and getAccount.

Changes

  • Create 00001_accounts migration to create database
  • Create Account entity with test coverage
  • Create Group entity with test coverage
  • Create IAccountsDatasource with implementation and test override

@iamacook iamacook self-assigned this Jun 14, 2024
@iamacook iamacook requested a review from a team as a code owner June 14, 2024 11:07
@coveralls
Copy link

coveralls commented Jun 14, 2024

Pull Request Test Coverage Report for Build 9515108778

Details

  • 32 of 45 (71.11%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 92.205%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/domain/interfaces/accounts.datasource.interface.ts 0 1 0.0%
src/datasources/accounts/accounts.datasource.ts 17 19 89.47%
src/datasources/accounts/tests/test.accounts.datasource.modulte.ts 0 5 0.0%
src/datasources/accounts/accounts.datasource.module.ts 0 5 0.0%
Totals Coverage Status
Change from base Build 9514300114: -0.02%
Covered Lines: 6840
Relevant Lines: 7135

💛 - Coveralls

@iamacook
Copy link
Member Author

We're going to merge this into #1652 before main in order to not create the previous tables.

@iamacook iamacook merged commit 56020d4 into remove-accounts Jun 14, 2024
8 checks passed
@iamacook iamacook deleted the accounts-datasource branch June 14, 2024 14:29
@coveralls
Copy link

coveralls commented Jun 14, 2024

Pull Request Test Coverage Report for Build 9517751552

Details

  • 32 of 45 (71.11%) changed or added relevant lines in 8 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.07%) to 92.215%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/domain/interfaces/accounts.datasource.interface.ts 0 1 0.0%
src/datasources/accounts/accounts.datasource.ts 17 19 89.47%
src/datasources/accounts/tests/test.accounts.datasource.modulte.ts 0 5 0.0%
src/datasources/accounts/accounts.datasource.module.ts 0 5 0.0%
Files with Coverage Reduction New Missed Lines %
src/routes/transactions/entities/tests/human-description.builder.ts 1 80.0%
Totals Coverage Status
Change from base Build 9517736861: -0.07%
Covered Lines: 6840
Relevant Lines: 7135

💛 - Coveralls

iamacook added a commit that referenced this pull request Jun 14, 2024
Replaces the current account/subscription integration, as well as their integration with alerts and emails with a new simple account basis (#1654) for fortchoming features:

Note: #1654 was merged into this commit before `main` in order to prevent duplicated old tables.

#1652:

- Remove account datasource
  - Remove test datasource from tests
- Remove account domain
- Remove subscription domain
- Decouple account/subscription integration from alerts:
  - Remove business logic
  - Remove redundant code
  - Remove relative test logic and skip those eventually required

#1654:

- Create `00001_accounts` migration to create database
- Create `Account` entity with test coverage
- Create `Group` entity with test coverage
- Create `IAccountsDatasource` with implementation and test override
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants