File size: 730 Bytes
1f074d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from src.services.account_service import AccountService
from src.services.transaction_service import TransactionService
from src.services.user_service import UserService

def main():
    account_repository = AccountRepository()
    transaction_repository = TransactionRepository()
    user_repository = UserRepository()

    account_service = AccountService(account_repository)
    transaction_service = TransactionService(transaction_repository)
    user_service = UserService(user_repository)

    user = user_service.create_user("John Doe", "john@example.com")
    account = account_service.create_account(user.id)

    transaction_service.create_transaction(account.id, 100.0, "deposit")

if __name__ == "__main__":
    main()