rasa-pro 3.13.1a5__py3-none-any.whl → 3.13.1a7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rasa-pro might be problematic. Click here for more details.
- rasa/cli/project_templates/finance/actions/action_add_payee.py +47 -0
- rasa/cli/project_templates/finance/actions/action_ask_account.py +50 -0
- rasa/cli/project_templates/finance/actions/action_ask_account_from.py +50 -0
- rasa/cli/project_templates/finance/actions/action_ask_card.py +47 -0
- rasa/cli/project_templates/finance/actions/action_check_balance.py +40 -0
- rasa/cli/project_templates/finance/actions/action_check_card_existence.py +35 -0
- rasa/cli/project_templates/finance/actions/action_check_payee_existence.py +40 -0
- rasa/cli/project_templates/finance/actions/action_check_sufficient_funds.py +41 -0
- rasa/cli/project_templates/finance/actions/action_list_payees.py +45 -0
- rasa/cli/project_templates/finance/actions/action_process_immediate_payment.py +18 -0
- rasa/cli/project_templates/finance/actions/action_remove_payee.py +49 -0
- rasa/cli/project_templates/finance/actions/action_schedule_payment.py +19 -0
- rasa/cli/project_templates/finance/actions/action_session_start.py +69 -0
- rasa/cli/project_templates/finance/actions/action_update_card_status.py +45 -0
- rasa/cli/project_templates/finance/actions/action_validate_payment_date.py +36 -0
- rasa/cli/project_templates/finance/actions/database.py +276 -0
- rasa/cli/project_templates/finance/config.yml +16 -1
- rasa/cli/project_templates/finance/csvs/accounts.csv +8 -0
- rasa/cli/project_templates/finance/csvs/advisors.csv +7 -0
- rasa/cli/project_templates/finance/csvs/appointments.csv +211 -0
- rasa/cli/project_templates/finance/csvs/branches.csv +10 -0
- rasa/cli/project_templates/finance/csvs/cards.csv +11 -0
- rasa/cli/project_templates/finance/csvs/payees.csv +10 -0
- rasa/cli/project_templates/finance/csvs/transactions.csv +71 -0
- rasa/cli/project_templates/finance/csvs/users.csv +4 -0
- rasa/cli/project_templates/finance/data/flows/add_payee.yml +29 -0
- rasa/cli/project_templates/finance/data/flows/block_card.yml +66 -0
- rasa/cli/project_templates/finance/data/flows/check_balance.yml +9 -0
- rasa/cli/project_templates/finance/data/flows/list_payees.yml +5 -0
- rasa/cli/project_templates/finance/data/flows/remove_payee.yml +21 -0
- rasa/cli/project_templates/finance/data/flows/select_card.yml +12 -0
- rasa/cli/project_templates/finance/data/flows/transfer_money.yml +64 -2
- rasa/cli/project_templates/finance/data/flows/welcome.yml +14 -0
- rasa/cli/project_templates/finance/data/nlu.yml +29 -0
- rasa/cli/project_templates/finance/data/patterns/pattern_chitchat.yml +7 -0
- rasa/cli/project_templates/finance/data/patterns/pattern_completed.yml +6 -0
- rasa/cli/project_templates/finance/data/patterns/pattern_search.yml +5 -0
- rasa/cli/project_templates/finance/data/patterns/pattern_session_start.yml +5 -3
- rasa/cli/project_templates/finance/data/source/accounts.json +51 -0
- rasa/cli/project_templates/finance/data/source/advisors.json +44 -0
- rasa/cli/project_templates/finance/data/source/appointments.json +1474 -0
- rasa/cli/project_templates/finance/data/source/branches.json +47 -0
- rasa/cli/project_templates/finance/data/source/cards.json +72 -0
- rasa/cli/project_templates/finance/data/source/payees.json +74 -0
- rasa/cli/project_templates/finance/data/source/transactions.json +492 -0
- rasa/cli/project_templates/finance/data/source/users.json +29 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/consequences_of_blocking_card.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/reasons_to_block_card.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/recovering_from_card_fraud.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/tips_for_card_security.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/what_to_do_if_card_is_lost.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/account_balance_security.txt +7 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/common_balance_inquiries.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/methods_to_check_balance.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/understanding_balance_updates.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/what_to_do_if_balance_is_incorrect.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/benefits_of_authorised_payees.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/common_issues_with_payees.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/general_payee_information.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/payee_management_tips.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/understanding_payee_types.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/common_transfer_errors.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/fees_for_transfers.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/general_transfer_information.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/security_tips_for_transfers.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/transfer_processing_times.txt +8 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part1.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part10.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part11.txt +48 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part12.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part13.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part14.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part15.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part16.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part17.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part18.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part19.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part2.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part20.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part21.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part22.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part23.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part24.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part25.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part26.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part27.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part28.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part29.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part3.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part30.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part31.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part32.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part33.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part34.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part35.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part36.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part37.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part38.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part39.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part4.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part40.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part41.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part42.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part43.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part44.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part45.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part46.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part47.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part48.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part49.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part5.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part50.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part51.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part52.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part53.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part54.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part55.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part56.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part57.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part58.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part59.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part6.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part60.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part61.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part7.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part8.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part9.txt +47 -0
- rasa/cli/project_templates/finance/domain/add_payee.yml +47 -0
- rasa/cli/project_templates/finance/domain/block_card.yml +101 -0
- rasa/cli/project_templates/finance/domain/check_balance.yml +9 -0
- rasa/cli/project_templates/finance/domain/default_actions.yml +16 -0
- rasa/cli/project_templates/finance/domain/default_flows.yml +33 -0
- rasa/cli/project_templates/finance/domain/list_payees.yml +4 -0
- rasa/cli/project_templates/finance/domain/remove_payee.yml +16 -0
- rasa/cli/project_templates/finance/domain/select_card.yml +12 -0
- rasa/cli/project_templates/finance/domain/transfer_money.yml +79 -0
- rasa/cli/project_templates/finance/endpoints.yml +6 -2
- rasa/cli/project_templates/finance/prompts/rephraser_demo_personality_prompt.jinja2 +19 -0
- rasa/cli/project_templates/finance/tests/conversation_repair/cancellations.yml +12 -0
- rasa/cli/project_templates/finance/tests/conversation_repair/cannot_handle.yml +7 -0
- rasa/cli/project_templates/finance/tests/conversation_repair/chitchat.yml +7 -0
- rasa/cli/project_templates/finance/tests/conversation_repair/clarification.yml +9 -0
- rasa/cli/project_templates/finance/tests/conversation_repair/completion.yml +18 -0
- rasa/cli/project_templates/finance/tests/conversation_repair/corrections.yml +17 -0
- rasa/cli/project_templates/finance/tests/conversation_repair/digressions.yml +32 -0
- rasa/cli/project_templates/finance/tests/conversation_repair/human_handoff.yml +21 -0
- rasa/cli/project_templates/finance/tests/conversation_repair/skipping_collect_steps.yml +16 -0
- rasa/cli/project_templates/finance/tests/demo_scripts/main.yml +16 -0
- rasa/cli/project_templates/finance/tests/happy_paths/balance_verification.yml +15 -0
- rasa/cli/project_templates/finance/tests/happy_paths/banking_questions.yml +12 -0
- rasa/cli/project_templates/finance/tests/happy_paths/card_blocking.yml +52 -0
- rasa/cli/project_templates/finance/tests/happy_paths/money_transfer.yml +136 -0
- rasa/cli/project_templates/finance/tests/happy_paths/payee_management.yml +27 -0
- rasa/cli/project_templates/finance/tests/happy_paths/user_greeted.yml +5 -0
- rasa/cli/project_templates/plain/domain.yml +1 -1
- rasa/cli/project_templates/telco/actions/actions_billing.py +196 -0
- rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +42 -0
- rasa/cli/project_templates/telco/prompts/command-generator.jinja2 +57 -0
- rasa/cli/scaffold.py +1 -1
- rasa/core/policies/enterprise_search_policy.py +1 -1
- rasa/dialogue_understanding/generator/flow_retrieval.py +10 -9
- rasa/version.py +1 -1
- {rasa_pro-3.13.1a5.dist-info → rasa_pro-3.13.1a7.dist-info}/METADATA +1 -1
- {rasa_pro-3.13.1a5.dist-info → rasa_pro-3.13.1a7.dist-info}/RECORD +201 -51
- rasa/cli/project_templates/finance/domain.yml +0 -7
- rasa/cli/project_templates/teleco/actions/actions_billing.py +0 -151
- rasa/cli/project_templates/teleco/actions/actions_get_data_from_db.py +0 -27
- /rasa/cli/project_templates/{teleco → finance}/prompts/command-generator.jinja2 +0 -0
- /rasa/cli/project_templates/{teleco → telco}/actions/actions_run_diagnostics.py +0 -0
- /rasa/cli/project_templates/{teleco → telco}/actions/actions_session_start.py +0 -0
- /rasa/cli/project_templates/{teleco → telco}/config.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/credentials.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/csvs/billing.csv +0 -0
- /rasa/cli/project_templates/{teleco → telco}/csvs/customers.csv +0 -0
- /rasa/cli/project_templates/{teleco → telco}/data/flows/flow_global.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/data/flows/flow_reboot_router.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/data/flows/flow_reset_router.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/data/flows/flow_solve_internet_issue.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/data/flows/flow_undertand_bill.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/data/patterns/pattern_completed.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/data/patterns/pattern_human_handoff.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/data/patterns/pattern_search.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/data/patterns/pattern_session_start.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/docs/reset_vs_rboot_router.txt +0 -0
- /rasa/cli/project_templates/{teleco → telco}/docs/restart_router.txt +0 -0
- /rasa/cli/project_templates/{teleco → telco}/docs/run_speed_test.txt +0 -0
- /rasa/cli/project_templates/{teleco → telco}/domain/domain_global.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/domain/domain_patterns.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/domain/domain_reboot_router.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/domain/domain_reset_router.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/domain/domain_run_speed_test.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/domain/domain_solve_internet_issue.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/domain/domain_undertand_bill.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/endpoints.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/tests/e2e_results_failed.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/tests/e2e_results_passed.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/tests/e2e_test_cases/billing_test_cases.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/tests/e2e_test_cases/global_test_cases.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/tests/e2e_test_cases/internet_slow_test_case.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/tests/e2e_test_cases/out_of_scope_test_case.yml +0 -0
- /rasa/cli/project_templates/{teleco → telco}/tests/e2e_test_cases/patterns_test_cases.yml +0 -0
- {rasa_pro-3.13.1a5.dist-info → rasa_pro-3.13.1a7.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.1a5.dist-info → rasa_pro-3.13.1a7.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.1a5.dist-info → rasa_pro-3.13.1a7.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import csv
|
|
2
|
+
import logging
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Any, Dict, List, Optional
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Database:
|
|
9
|
+
def __init__(self, csv_path: Optional[Path] = None) -> None:
|
|
10
|
+
"""Initialize the database with CSV file paths."""
|
|
11
|
+
self.project_root_path = Path(__file__).resolve().parent.parent
|
|
12
|
+
self.csv_path = csv_path or self.project_root_path / "csvs"
|
|
13
|
+
self.logger = self.setup_logger()
|
|
14
|
+
|
|
15
|
+
def setup_logger(self) -> logging.Logger:
|
|
16
|
+
"""Set up logging configuration."""
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
logger.setLevel(logging.DEBUG)
|
|
19
|
+
|
|
20
|
+
formatter = logging.Formatter(
|
|
21
|
+
"%(asctime)s %(levelname)8s %(name)s - %(message)s"
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
console_handler = logging.StreamHandler()
|
|
25
|
+
console_handler.setLevel(logging.DEBUG)
|
|
26
|
+
console_handler.setFormatter(formatter)
|
|
27
|
+
logger.addHandler(console_handler)
|
|
28
|
+
|
|
29
|
+
return logger
|
|
30
|
+
|
|
31
|
+
def _read_csv(self, filename: str) -> List[Dict[str, Any]]:
|
|
32
|
+
"""Read CSV file and return list of dictionaries."""
|
|
33
|
+
try:
|
|
34
|
+
with open(self.csv_path / filename, "r", newline="") as csvfile:
|
|
35
|
+
reader = csv.DictReader(csvfile)
|
|
36
|
+
return list(reader)
|
|
37
|
+
except Exception as e:
|
|
38
|
+
self.logger.error(f"Error reading CSV file {filename}: {e}")
|
|
39
|
+
return []
|
|
40
|
+
|
|
41
|
+
def _write_csv(self, filename: str, data: List[Dict[str, Any]]) -> bool:
|
|
42
|
+
"""Write list of dictionaries to CSV file."""
|
|
43
|
+
try:
|
|
44
|
+
if not data:
|
|
45
|
+
return True
|
|
46
|
+
|
|
47
|
+
with open(self.csv_path / filename, "w", newline="") as csvfile:
|
|
48
|
+
writer = csv.DictWriter(csvfile, fieldnames=data[0].keys())
|
|
49
|
+
writer.writeheader()
|
|
50
|
+
writer.writerows(data)
|
|
51
|
+
return True
|
|
52
|
+
except Exception as e:
|
|
53
|
+
self.logger.error(f"Error writing CSV file {filename}: {e}")
|
|
54
|
+
return False
|
|
55
|
+
|
|
56
|
+
def get_user_by_name(self, username: str) -> Optional[Dict[str, Any]]:
|
|
57
|
+
"""Get user information by username."""
|
|
58
|
+
try:
|
|
59
|
+
users = self._read_csv("users.csv")
|
|
60
|
+
for user in users:
|
|
61
|
+
if user["name"] == username:
|
|
62
|
+
return user
|
|
63
|
+
return None
|
|
64
|
+
except Exception as e:
|
|
65
|
+
self.logger.error(f"Error getting user by name: {e}")
|
|
66
|
+
return None
|
|
67
|
+
|
|
68
|
+
def get_user_by_id(self, user_id: int) -> Optional[Dict[str, Any]]:
|
|
69
|
+
"""Get user information by user_id."""
|
|
70
|
+
try:
|
|
71
|
+
users = self._read_csv("users.csv")
|
|
72
|
+
for user in users:
|
|
73
|
+
if int(user["id"]) == user_id:
|
|
74
|
+
return user
|
|
75
|
+
return None
|
|
76
|
+
except Exception as e:
|
|
77
|
+
self.logger.error(f"Error getting user by id: {e}")
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
def get_account_by_user_and_number(
|
|
81
|
+
self, user_id: int, account_number: str
|
|
82
|
+
) -> Optional[Dict[str, Any]]:
|
|
83
|
+
"""Get account information by user_id and account number."""
|
|
84
|
+
try:
|
|
85
|
+
accounts = self._read_csv("accounts.csv")
|
|
86
|
+
for account in accounts:
|
|
87
|
+
if (
|
|
88
|
+
int(account["user_id"]) == user_id
|
|
89
|
+
and account["number"] == account_number
|
|
90
|
+
):
|
|
91
|
+
return account
|
|
92
|
+
return None
|
|
93
|
+
except Exception as e:
|
|
94
|
+
self.logger.error(f"Error getting account: {e}")
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
def get_accounts_by_user(self, user_id: int) -> List[Dict[str, Any]]:
|
|
98
|
+
"""Get all accounts for a user."""
|
|
99
|
+
try:
|
|
100
|
+
accounts = self._read_csv("accounts.csv")
|
|
101
|
+
return [
|
|
102
|
+
account for account in accounts if int(account["user_id"]) == user_id
|
|
103
|
+
]
|
|
104
|
+
except Exception as e:
|
|
105
|
+
self.logger.error(f"Error getting accounts by user: {e}")
|
|
106
|
+
return []
|
|
107
|
+
|
|
108
|
+
def get_payees_by_user(self, user_id: int) -> List[Dict[str, Any]]:
|
|
109
|
+
"""Get all payees for a user."""
|
|
110
|
+
try:
|
|
111
|
+
payees = self._read_csv("payees.csv")
|
|
112
|
+
return [payee for payee in payees if int(payee["user_id"]) == user_id]
|
|
113
|
+
except Exception as e:
|
|
114
|
+
self.logger.error(f"Error getting payees by user: {e}")
|
|
115
|
+
return []
|
|
116
|
+
|
|
117
|
+
def get_payee_by_name_and_user(
|
|
118
|
+
self, payee_name: str, user_id: int
|
|
119
|
+
) -> Optional[Dict[str, Any]]:
|
|
120
|
+
"""Get payee information by name and user_id."""
|
|
121
|
+
try:
|
|
122
|
+
payees = self._read_csv("payees.csv")
|
|
123
|
+
for payee in payees:
|
|
124
|
+
if payee["name"] == payee_name and int(payee["user_id"]) == user_id:
|
|
125
|
+
return payee
|
|
126
|
+
return None
|
|
127
|
+
except Exception as e:
|
|
128
|
+
self.logger.error(f"Error getting payee by name and user: {e}")
|
|
129
|
+
return None
|
|
130
|
+
|
|
131
|
+
def get_cards_by_user(self, user_id: int) -> List[Dict[str, Any]]:
|
|
132
|
+
"""Get all cards for a user."""
|
|
133
|
+
try:
|
|
134
|
+
cards = self._read_csv("cards.csv")
|
|
135
|
+
return [card for card in cards if int(card["user_id"]) == user_id]
|
|
136
|
+
except Exception as e:
|
|
137
|
+
self.logger.error(f"Error getting cards by user: {e}")
|
|
138
|
+
return []
|
|
139
|
+
|
|
140
|
+
def get_card_by_number(self, card_number: str) -> Optional[Dict[str, Any]]:
|
|
141
|
+
"""Get card information by card number."""
|
|
142
|
+
try:
|
|
143
|
+
cards = self._read_csv("cards.csv")
|
|
144
|
+
for card in cards:
|
|
145
|
+
if card["number"] == card_number:
|
|
146
|
+
return card
|
|
147
|
+
return None
|
|
148
|
+
except Exception as e:
|
|
149
|
+
self.logger.error(f"Error getting card by number: {e}")
|
|
150
|
+
return None
|
|
151
|
+
|
|
152
|
+
def update_card_status(self, card_number: str, status: str) -> bool:
|
|
153
|
+
"""Update card status."""
|
|
154
|
+
try:
|
|
155
|
+
cards = self._read_csv("cards.csv")
|
|
156
|
+
for card in cards:
|
|
157
|
+
if card["number"] == card_number:
|
|
158
|
+
card["status"] = status
|
|
159
|
+
break
|
|
160
|
+
return self._write_csv("cards.csv", cards)
|
|
161
|
+
except Exception as e:
|
|
162
|
+
self.logger.error(f"Error updating card status: {e}")
|
|
163
|
+
return False
|
|
164
|
+
|
|
165
|
+
def add_payee(
|
|
166
|
+
self,
|
|
167
|
+
user_id: int,
|
|
168
|
+
name: str,
|
|
169
|
+
sort_code: str,
|
|
170
|
+
account_number: str,
|
|
171
|
+
payee_type: str,
|
|
172
|
+
reference: str = "",
|
|
173
|
+
) -> bool:
|
|
174
|
+
"""Add a new payee."""
|
|
175
|
+
try:
|
|
176
|
+
payees = self._read_csv("payees.csv")
|
|
177
|
+
|
|
178
|
+
# Get the next ID
|
|
179
|
+
next_id = 1
|
|
180
|
+
if payees:
|
|
181
|
+
next_id = max(int(payee["id"]) for payee in payees) + 1
|
|
182
|
+
|
|
183
|
+
# Create new payee record
|
|
184
|
+
new_payee = {
|
|
185
|
+
"id": str(next_id),
|
|
186
|
+
"user_id": str(user_id),
|
|
187
|
+
"name": name,
|
|
188
|
+
"sort_code": sort_code,
|
|
189
|
+
"account_number": account_number,
|
|
190
|
+
"type": payee_type,
|
|
191
|
+
"reference": reference,
|
|
192
|
+
"added_at": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
# Add to list and save
|
|
196
|
+
payees.append(new_payee)
|
|
197
|
+
return self._write_csv("payees.csv", payees)
|
|
198
|
+
except Exception as e:
|
|
199
|
+
self.logger.error(f"Error adding payee: {e}")
|
|
200
|
+
return False
|
|
201
|
+
|
|
202
|
+
def remove_payee(self, payee_name: str, user_id: int) -> bool:
|
|
203
|
+
"""Remove a payee."""
|
|
204
|
+
try:
|
|
205
|
+
payees = self._read_csv("payees.csv")
|
|
206
|
+
payees = [
|
|
207
|
+
payee
|
|
208
|
+
for payee in payees
|
|
209
|
+
if not (
|
|
210
|
+
payee["name"] == payee_name and int(payee["user_id"]) == user_id
|
|
211
|
+
)
|
|
212
|
+
]
|
|
213
|
+
return self._write_csv("payees.csv", payees)
|
|
214
|
+
except Exception as e:
|
|
215
|
+
self.logger.error(f"Error removing payee: {e}")
|
|
216
|
+
return False
|
|
217
|
+
|
|
218
|
+
def check_sufficient_funds(
|
|
219
|
+
self, user_id: int, account_number: str, amount: float
|
|
220
|
+
) -> bool:
|
|
221
|
+
"""Check if account has sufficient funds."""
|
|
222
|
+
try:
|
|
223
|
+
account = self.get_account_by_user_and_number(user_id, account_number)
|
|
224
|
+
if not account:
|
|
225
|
+
return False
|
|
226
|
+
return float(account["balance"]) >= amount
|
|
227
|
+
except Exception as e:
|
|
228
|
+
self.logger.error(f"Error checking sufficient funds: {e}")
|
|
229
|
+
return False
|
|
230
|
+
|
|
231
|
+
def get_branches(self) -> List[Dict[str, Any]]:
|
|
232
|
+
"""Get all branches."""
|
|
233
|
+
try:
|
|
234
|
+
return self._read_csv("branches.csv")
|
|
235
|
+
except Exception as e:
|
|
236
|
+
self.logger.error(f"Error getting branches: {e}")
|
|
237
|
+
return []
|
|
238
|
+
|
|
239
|
+
def get_advisors_by_branch(self, branch_id: int) -> List[Dict[str, Any]]:
|
|
240
|
+
"""Get all advisors for a branch."""
|
|
241
|
+
try:
|
|
242
|
+
advisors = self._read_csv("advisors.csv")
|
|
243
|
+
return [
|
|
244
|
+
advisor
|
|
245
|
+
for advisor in advisors
|
|
246
|
+
if int(advisor["branch_id"]) == branch_id
|
|
247
|
+
]
|
|
248
|
+
except Exception as e:
|
|
249
|
+
self.logger.error(f"Error getting advisors by branch: {e}")
|
|
250
|
+
return []
|
|
251
|
+
|
|
252
|
+
def get_appointments_by_advisor(self, advisor_id: int) -> List[Dict[str, Any]]:
|
|
253
|
+
"""Get all appointments for an advisor."""
|
|
254
|
+
try:
|
|
255
|
+
appointments = self._read_csv("appointments.csv")
|
|
256
|
+
return [
|
|
257
|
+
appointment
|
|
258
|
+
for appointment in appointments
|
|
259
|
+
if int(appointment["advisor_id"]) == advisor_id
|
|
260
|
+
]
|
|
261
|
+
except Exception as e:
|
|
262
|
+
self.logger.error(f"Error getting appointments by advisor: {e}")
|
|
263
|
+
return []
|
|
264
|
+
|
|
265
|
+
def __enter__(self) -> "Database":
|
|
266
|
+
"""Enter the runtime context related to this object."""
|
|
267
|
+
return self
|
|
268
|
+
|
|
269
|
+
def __exit__(
|
|
270
|
+
self,
|
|
271
|
+
exc_type: Optional[type],
|
|
272
|
+
exc_value: Optional[BaseException],
|
|
273
|
+
traceback: Optional[Any],
|
|
274
|
+
) -> None:
|
|
275
|
+
"""Exit the runtime context related to this object."""
|
|
276
|
+
self.logger.info("Database connection closed")
|
|
@@ -7,11 +7,26 @@ assistant_id: placeholder_default
|
|
|
7
7
|
|
|
8
8
|
language: en
|
|
9
9
|
pipeline:
|
|
10
|
+
- name: WhitespaceTokenizer
|
|
11
|
+
- name: RegexFeaturizer
|
|
12
|
+
- name: LexicalSyntacticFeaturizer
|
|
13
|
+
- name: CountVectorsFeaturizer
|
|
14
|
+
- name: CountVectorsFeaturizer
|
|
15
|
+
analyzer: char_wb
|
|
16
|
+
min_ngram: 1
|
|
17
|
+
max_ngram: 4
|
|
18
|
+
- name: LogisticRegressionClassifier
|
|
19
|
+
# - name: NLUCommandAdapter
|
|
10
20
|
- name: CompactLLMCommandGenerator
|
|
11
21
|
llm:
|
|
12
22
|
model_group: openai-gpt-4o
|
|
23
|
+
prompt_template: prompts/command-generator.jinja2
|
|
13
24
|
|
|
14
25
|
# Configuration for Rasa Core.
|
|
15
26
|
policies:
|
|
16
27
|
- name: FlowPolicy
|
|
17
|
-
- name:
|
|
28
|
+
- name: EnterpriseSearchPolicy
|
|
29
|
+
model: openai-gpt-4o
|
|
30
|
+
vector_store:
|
|
31
|
+
type: "faiss"
|
|
32
|
+
source: "./docs"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
id,user_id,balance,type,number,sort_code,created_at
|
|
2
|
+
1,1,10123.45,savings,12345678,123456,"2024-10-02 17:33:16"
|
|
3
|
+
2,1,4923.67,current,23456789,123456,"2024-10-02 17:33:16"
|
|
4
|
+
3,2,14789.32,current,34567890,234567,"2024-10-02 17:33:16"
|
|
5
|
+
4,2,7134.56,savings,45678901,234567,"2024-10-02 17:33:16"
|
|
6
|
+
5,2,2987.23,business,56789012,234567,"2024-10-02 17:33:16"
|
|
7
|
+
6,3,20245.67,savings,67890123,345678,"2024-10-02 17:33:16"
|
|
8
|
+
7,3,8034.12,current,78901234,345678,"2024-10-02 17:33:16"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
id,branch_id,name,email,phone,position
|
|
2
|
+
1,1,"Eto Demerzel",eto.demerzel@trantorbranch.com,02079460001,"Business Loan Advisor"
|
|
3
|
+
2,1,"Bayta Darell",bayta.darell@trantorbranch.com,02079460003,"Wealth Management Advisor"
|
|
4
|
+
3,2,"Daneel Olivaw",daneel.olivaw@terminusbranch.com,02079460004,"Retirement Planning Advisor"
|
|
5
|
+
4,3,"Hober Mallow",hober.mallow@asimovbranch.com,02079460007,"Personal Finance Advisor"
|
|
6
|
+
5,3,"Bel Riose",bel.riose@asimovbranch.com,02079460008,"Investment Advisor"
|
|
7
|
+
6,3,Pritcher,pritcher@asimovbranch.com,02079460009,"Investment Advisor"
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
id,advisor_id,date,start_time,end_time,status
|
|
2
|
+
1,1,2024-10-01,09:00,09:30,open
|
|
3
|
+
2,1,2024-10-01,10:00,10:30,booked
|
|
4
|
+
3,1,2024-10-01,11:00,11:30,open
|
|
5
|
+
4,1,2024-10-01,14:00,14:30,booked
|
|
6
|
+
5,1,2024-10-01,15:00,15:30,booked
|
|
7
|
+
6,1,2024-10-02,09:00,09:30,booked
|
|
8
|
+
7,1,2024-10-02,10:00,10:30,open
|
|
9
|
+
8,1,2024-10-02,11:00,11:30,open
|
|
10
|
+
9,1,2024-10-02,14:00,14:30,booked
|
|
11
|
+
10,1,2024-10-02,15:00,15:30,booked
|
|
12
|
+
11,1,2024-10-03,09:00,09:30,open
|
|
13
|
+
12,1,2024-10-03,10:00,10:30,booked
|
|
14
|
+
13,1,2024-10-03,11:00,11:30,open
|
|
15
|
+
14,1,2024-10-03,14:00,14:30,booked
|
|
16
|
+
15,1,2024-10-03,15:00,15:30,booked
|
|
17
|
+
16,1,2024-10-04,09:00,09:30,booked
|
|
18
|
+
17,1,2024-10-04,10:00,10:30,open
|
|
19
|
+
18,1,2024-10-04,11:00,11:30,booked
|
|
20
|
+
19,1,2024-10-04,14:00,14:30,open
|
|
21
|
+
20,1,2024-10-04,15:00,15:30,booked
|
|
22
|
+
21,1,2024-10-05,09:00,09:30,booked
|
|
23
|
+
22,1,2024-10-05,10:00,10:30,open
|
|
24
|
+
23,1,2024-10-05,11:00,11:30,booked
|
|
25
|
+
24,1,2024-10-05,14:00,14:30,booked
|
|
26
|
+
25,1,2024-10-05,15:00,15:30,open
|
|
27
|
+
26,1,2024-10-06,09:00,09:30,open
|
|
28
|
+
27,1,2024-10-06,10:00,10:30,booked
|
|
29
|
+
28,1,2024-10-06,11:00,11:30,booked
|
|
30
|
+
29,1,2024-10-06,14:00,14:30,open
|
|
31
|
+
30,1,2024-10-06,15:00,15:30,booked
|
|
32
|
+
31,1,2024-10-07,09:00,09:30,booked
|
|
33
|
+
32,1,2024-10-07,10:00,10:30,open
|
|
34
|
+
33,1,2024-10-07,11:00,11:30,open
|
|
35
|
+
34,1,2024-10-07,14:00,14:30,booked
|
|
36
|
+
35,1,2024-10-07,15:00,15:30,booked
|
|
37
|
+
36,2,2024-10-01,09:00,09:30,open
|
|
38
|
+
37,2,2024-10-01,10:00,10:30,booked
|
|
39
|
+
38,2,2024-10-01,11:00,11:30,open
|
|
40
|
+
39,2,2024-10-01,14:00,14:30,booked
|
|
41
|
+
40,2,2024-10-01,15:00,15:30,booked
|
|
42
|
+
41,2,2024-10-02,09:00,09:30,booked
|
|
43
|
+
42,2,2024-10-02,10:00,10:30,open
|
|
44
|
+
43,2,2024-10-02,11:00,11:30,open
|
|
45
|
+
44,2,2024-10-02,14:00,14:30,booked
|
|
46
|
+
45,2,2024-10-02,15:00,15:30,booked
|
|
47
|
+
46,2,2024-10-03,09:00,09:30,open
|
|
48
|
+
47,2,2024-10-03,10:00,10:30,booked
|
|
49
|
+
48,2,2024-10-03,11:00,11:30,open
|
|
50
|
+
49,2,2024-10-03,14:00,14:30,booked
|
|
51
|
+
50,2,2024-10-03,15:00,15:30,booked
|
|
52
|
+
51,2,2024-10-04,09:00,09:30,booked
|
|
53
|
+
52,2,2024-10-04,10:00,10:30,open
|
|
54
|
+
53,2,2024-10-04,11:00,11:30,booked
|
|
55
|
+
54,2,2024-10-04,14:00,14:30,open
|
|
56
|
+
55,2,2024-10-04,15:00,15:30,booked
|
|
57
|
+
56,2,2024-10-05,09:00,09:30,booked
|
|
58
|
+
57,2,2024-10-05,10:00,10:30,open
|
|
59
|
+
58,2,2024-10-05,11:00,11:30,booked
|
|
60
|
+
59,2,2024-10-05,14:00,14:30,booked
|
|
61
|
+
60,2,2024-10-05,15:00,15:30,open
|
|
62
|
+
61,2,2024-10-06,09:00,09:30,open
|
|
63
|
+
62,2,2024-10-06,10:00,10:30,booked
|
|
64
|
+
63,2,2024-10-06,11:00,11:30,booked
|
|
65
|
+
64,2,2024-10-06,14:00,14:30,open
|
|
66
|
+
65,2,2024-10-06,15:00,15:30,booked
|
|
67
|
+
66,2,2024-10-07,09:00,09:30,booked
|
|
68
|
+
67,2,2024-10-07,10:00,10:30,open
|
|
69
|
+
68,2,2024-10-07,11:00,11:30,open
|
|
70
|
+
69,2,2024-10-07,14:00,14:30,booked
|
|
71
|
+
70,2,2024-10-07,15:00,15:30,booked
|
|
72
|
+
71,3,2024-10-01,09:00,09:30,open
|
|
73
|
+
72,3,2024-10-01,10:00,10:30,booked
|
|
74
|
+
73,3,2024-10-01,11:00,11:30,open
|
|
75
|
+
74,3,2024-10-01,14:00,14:30,booked
|
|
76
|
+
75,3,2024-10-01,15:00,15:30,booked
|
|
77
|
+
76,3,2024-10-02,09:00,09:30,booked
|
|
78
|
+
77,3,2024-10-02,10:00,10:30,open
|
|
79
|
+
78,3,2024-10-02,11:00,11:30,open
|
|
80
|
+
79,3,2024-10-02,14:00,14:30,booked
|
|
81
|
+
80,3,2024-10-02,15:00,15:30,booked
|
|
82
|
+
81,3,2024-10-03,09:00,09:30,booked
|
|
83
|
+
82,3,2024-10-03,10:00,10:30,booked
|
|
84
|
+
83,3,2024-10-03,11:00,11:30,open
|
|
85
|
+
84,3,2024-10-03,14:00,14:30,open
|
|
86
|
+
85,3,2024-10-03,15:00,15:30,booked
|
|
87
|
+
86,3,2024-10-04,09:00,09:30,open
|
|
88
|
+
87,3,2024-10-04,10:00,10:30,booked
|
|
89
|
+
88,3,2024-10-04,11:00,11:30,booked
|
|
90
|
+
89,3,2024-10-04,14:00,14:30,open
|
|
91
|
+
90,3,2024-10-04,15:00,15:30,booked
|
|
92
|
+
91,3,2024-10-05,09:00,09:30,booked
|
|
93
|
+
92,3,2024-10-05,10:00,10:30,open
|
|
94
|
+
93,3,2024-10-05,11:00,11:30,booked
|
|
95
|
+
94,3,2024-10-05,14:00,14:30,booked
|
|
96
|
+
95,3,2024-10-05,15:00,15:30,open
|
|
97
|
+
96,3,2024-10-06,09:00,09:30,open
|
|
98
|
+
97,3,2024-10-06,10:00,10:30,booked
|
|
99
|
+
98,3,2024-10-06,11:00,11:30,booked
|
|
100
|
+
99,3,2024-10-06,14:00,14:30,open
|
|
101
|
+
100,3,2024-10-06,15:00,15:30,booked
|
|
102
|
+
101,3,2024-10-07,09:00,09:30,booked
|
|
103
|
+
102,3,2024-10-07,10:00,10:30,open
|
|
104
|
+
103,3,2024-10-07,11:00,11:30,open
|
|
105
|
+
104,3,2024-10-07,14:00,14:30,booked
|
|
106
|
+
105,3,2024-10-07,15:00,15:30,booked
|
|
107
|
+
106,4,2024-10-01,09:00,09:30,open
|
|
108
|
+
107,4,2024-10-01,10:00,10:30,booked
|
|
109
|
+
108,4,2024-10-01,11:00,11:30,open
|
|
110
|
+
109,4,2024-10-01,14:00,14:30,booked
|
|
111
|
+
110,4,2024-10-01,15:00,15:30,booked
|
|
112
|
+
111,4,2024-10-02,09:00,09:30,booked
|
|
113
|
+
112,4,2024-10-02,10:00,10:30,open
|
|
114
|
+
113,4,2024-10-02,11:00,11:30,open
|
|
115
|
+
114,4,2024-10-02,14:00,14:30,booked
|
|
116
|
+
115,4,2024-10-02,15:00,15:30,booked
|
|
117
|
+
116,4,2024-10-03,09:00,09:30,open
|
|
118
|
+
117,4,2024-10-03,10:00,10:30,booked
|
|
119
|
+
118,4,2024-10-03,11:00,11:30,open
|
|
120
|
+
119,4,2024-10-03,14:00,14:30,booked
|
|
121
|
+
120,4,2024-10-03,15:00,15:30,booked
|
|
122
|
+
121,4,2024-10-04,09:00,09:30,booked
|
|
123
|
+
122,4,2024-10-04,10:00,10:30,open
|
|
124
|
+
123,4,2024-10-04,11:00,11:30,booked
|
|
125
|
+
124,4,2024-10-04,14:00,14:30,booked
|
|
126
|
+
125,4,2024-10-04,15:00,15:30,open
|
|
127
|
+
126,4,2024-10-05,09:00,09:30,open
|
|
128
|
+
127,4,2024-10-05,10:00,10:30,booked
|
|
129
|
+
128,4,2024-10-05,11:00,11:30,booked
|
|
130
|
+
129,4,2024-10-05,14:00,14:30,booked
|
|
131
|
+
130,4,2024-10-05,15:00,15:30,open
|
|
132
|
+
131,4,2024-10-06,09:00,09:30,open
|
|
133
|
+
132,4,2024-10-06,10:00,10:30,open
|
|
134
|
+
133,4,2024-10-06,11:00,11:30,booked
|
|
135
|
+
134,4,2024-10-06,14:00,14:30,booked
|
|
136
|
+
135,4,2024-10-06,15:00,15:30,open
|
|
137
|
+
136,4,2024-10-07,09:00,09:30,open
|
|
138
|
+
137,4,2024-10-07,10:00,10:30,open
|
|
139
|
+
138,4,2024-10-07,11:00,11:30,booked
|
|
140
|
+
139,4,2024-10-07,14:00,14:30,open
|
|
141
|
+
140,4,2024-10-07,15:00,15:30,booked
|
|
142
|
+
141,5,2024-10-01,09:00,09:30,open
|
|
143
|
+
142,5,2024-10-01,10:00,10:30,booked
|
|
144
|
+
143,5,2024-10-01,11:00,11:30,open
|
|
145
|
+
144,5,2024-10-01,14:00,14:30,booked
|
|
146
|
+
145,5,2024-10-01,15:00,15:30,booked
|
|
147
|
+
146,5,2024-10-02,09:00,09:30,booked
|
|
148
|
+
147,5,2024-10-02,10:00,10:30,open
|
|
149
|
+
148,5,2024-10-02,11:00,11:30,open
|
|
150
|
+
149,5,2024-10-02,14:00,14:30,booked
|
|
151
|
+
150,5,2024-10-02,15:00,15:30,booked
|
|
152
|
+
151,5,2024-10-03,09:00,09:30,open
|
|
153
|
+
152,5,2024-10-03,10:00,10:30,booked
|
|
154
|
+
153,5,2024-10-03,11:00,11:30,open
|
|
155
|
+
154,5,2024-10-03,14:00,14:30,booked
|
|
156
|
+
155,5,2024-10-03,15:00,15:30,booked
|
|
157
|
+
156,5,2024-10-04,09:00,09:30,booked
|
|
158
|
+
157,5,2024-10-04,10:00,10:30,open
|
|
159
|
+
158,5,2024-10-04,11:00,11:30,booked
|
|
160
|
+
159,5,2024-10-04,14:00,14:30,booked
|
|
161
|
+
160,5,2024-10-04,15:00,15:30,open
|
|
162
|
+
161,5,2024-10-05,09:00,09:30,open
|
|
163
|
+
162,5,2024-10-05,10:00,10:30,booked
|
|
164
|
+
163,5,2024-10-05,11:00,11:30,booked
|
|
165
|
+
164,5,2024-10-05,14:00,14:30,booked
|
|
166
|
+
165,5,2024-10-05,15:00,15:30,open
|
|
167
|
+
166,5,2024-10-06,09:00,09:30,open
|
|
168
|
+
167,5,2024-10-06,10:00,10:30,open
|
|
169
|
+
168,5,2024-10-06,11:00,11:30,booked
|
|
170
|
+
169,5,2024-10-06,14:00,14:30,booked
|
|
171
|
+
170,5,2024-10-06,15:00,15:30,open
|
|
172
|
+
171,5,2024-10-07,09:00,09:30,open
|
|
173
|
+
172,5,2024-10-07,10:00,10:30,open
|
|
174
|
+
173,5,2024-10-07,11:00,11:30,booked
|
|
175
|
+
174,5,2024-10-07,14:00,14:30,open
|
|
176
|
+
175,5,2024-10-07,15:00,15:30,booked
|
|
177
|
+
176,6,2024-10-01,09:00,09:30,open
|
|
178
|
+
177,6,2024-10-01,10:00,10:30,booked
|
|
179
|
+
178,6,2024-10-01,11:00,11:30,open
|
|
180
|
+
179,6,2024-10-01,14:00,14:30,booked
|
|
181
|
+
180,6,2024-10-01,15:00,15:30,booked
|
|
182
|
+
181,6,2024-10-02,09:00,09:30,booked
|
|
183
|
+
182,6,2024-10-02,10:00,10:30,open
|
|
184
|
+
183,6,2024-10-02,11:00,11:30,open
|
|
185
|
+
184,6,2024-10-02,14:00,14:30,booked
|
|
186
|
+
185,6,2024-10-02,15:00,15:30,booked
|
|
187
|
+
186,6,2024-10-03,09:00,09:30,open
|
|
188
|
+
187,6,2024-10-03,10:00,10:30,booked
|
|
189
|
+
188,6,2024-10-03,11:00,11:30,open
|
|
190
|
+
189,6,2024-10-03,14:00,14:30,booked
|
|
191
|
+
190,6,2024-10-03,15:00,15:30,booked
|
|
192
|
+
191,6,2024-10-04,09:00,09:30,booked
|
|
193
|
+
192,6,2024-10-04,10:00,10:30,open
|
|
194
|
+
193,6,2024-10-04,11:00,11:30,booked
|
|
195
|
+
194,6,2024-10-04,14:00,14:30,booked
|
|
196
|
+
195,6,2024-10-04,15:00,15:30,open
|
|
197
|
+
196,6,2024-10-05,09:00,09:30,open
|
|
198
|
+
197,6,2024-10-05,10:00,10:30,booked
|
|
199
|
+
198,6,2024-10-05,11:00,11:30,booked
|
|
200
|
+
199,6,2024-10-05,14:00,14:30,booked
|
|
201
|
+
200,6,2024-10-05,15:00,15:30,open
|
|
202
|
+
201,6,2024-10-06,09:00,09:30,open
|
|
203
|
+
202,6,2024-10-06,10:00,10:30,open
|
|
204
|
+
203,6,2024-10-06,11:00,11:30,booked
|
|
205
|
+
204,6,2024-10-06,14:00,14:30,booked
|
|
206
|
+
205,6,2024-10-06,15:00,15:30,open
|
|
207
|
+
206,6,2024-10-07,09:00,09:30,open
|
|
208
|
+
207,6,2024-10-07,10:00,10:30,open
|
|
209
|
+
208,6,2024-10-07,11:00,11:30,booked
|
|
210
|
+
209,6,2024-10-07,14:00,14:30,open
|
|
211
|
+
210,6,2024-10-07,15:00,15:30,booked
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
id,name,address,distance_km
|
|
2
|
+
1,"Trantor Square Branch","10 Psychohistorical Way, Trantor Square, London, SW1A 1AB",0.2
|
|
3
|
+
2,"Foundation Central Branch","5 Foundation Road, Trantor Square, London, SW1A 1AC",0.3
|
|
4
|
+
3,"Trantor East Branch","12 Trantor Lane, Trantor Square, London, SW1A 1AD",0.4
|
|
5
|
+
4,"Terminus Park Branch","3 Foundation Drive, Terminus Park, London, E1 6AP",0.5
|
|
6
|
+
5,"Foundation Retail Branch","8 Terminus Avenue, Terminus Park, London, E1 6AQ",0.6
|
|
7
|
+
6,"Terminus Square Branch","6 Terminus Way, Terminus Park, London, E1 6AR",0.7
|
|
8
|
+
7,"Asimov Gardens Branch","4 Scholar's Lane, Asimov Gardens, London, WC1B 5HB",0.3
|
|
9
|
+
8,"Garden Square Branch","8 Asimov Way, Asimov Gardens, London, WC1B 5HC",0.5
|
|
10
|
+
9,"Scholar's Lane Branch","2 Scholar's Court, Asimov Gardens, London, WC1B 5HD",0.4
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
id,user_id,account_id,number,type,status,issued_at,updated_at
|
|
2
|
+
1,1,1,1111222233334444,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
3
|
+
2,1,2,1234567812345678,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
4
|
+
3,1,,5555666677778888,credit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
5
|
+
4,2,3,9999000011112222,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
6
|
+
5,2,4,2345678923456789,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
7
|
+
6,2,5,3456789034567890,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
8
|
+
7,2,,3333444455556666,credit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
9
|
+
8,3,6,2222333344445555,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
10
|
+
9,3,7,4567890145678901,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
11
|
+
10,3,,6666777788889999,credit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
id,user_id,name,sort_code,account_number,type,reference,added_at
|
|
2
|
+
1,1,Robert,123456,65432178,person,friend,"2024-10-02 17:33:16"
|
|
3
|
+
2,1,James,123456,87654321,person,son,"2024-10-02 17:33:16"
|
|
4
|
+
3,1,"Food Market",123456,11223344,business,groceries,"2024-10-02 17:33:16"
|
|
5
|
+
4,2,Richard,654321,12345678,person,"business partner","2024-10-02 17:33:16"
|
|
6
|
+
5,2,Susan,654321,87654321,person,friend,"2024-10-02 17:33:16"
|
|
7
|
+
6,2,"Electric Company",654321,99887766,business,utilities,"2024-10-02 17:33:16"
|
|
8
|
+
8,3,Amy,111111,33332222,person,colleague,"2024-10-02 17:33:16"
|
|
9
|
+
9,3,"Fitness Gym",111111,44556677,business,gym,"2024-10-02 17:33:16"
|
|
10
|
+
10,3,William,111111,22223333,person,friend,"2024-11-27 12:21:15"
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
id,account_id,amount,datetime,description,payment_method,payee
|
|
2
|
+
1,1,500.0,"2024-08-11 02:45:50","Purchase at Galactic Market",debit,"Galactic Market"
|
|
3
|
+
2,1,1500.0,"2024-08-05 15:18:59","Rent Payment to Trantor Estates",regular,"Trantor Estates"
|
|
4
|
+
3,1,75.5,"2024-08-27 23:24:38","Dinner at Mycogen Sector Restaurant",debit,"Mycogen Cuisine"
|
|
5
|
+
4,1,250.0,"2024-08-29 19:59:35","Interplanetary Transport Fare",debit,"Imperial Spacelines"
|
|
6
|
+
5,1,120.75,"2024-09-23 01:41:01","Vault of Trantor Museum Tickets",debit,"Trantor Historical Society"
|
|
7
|
+
6,1,800.0,"2024-09-21 13:26:46","Personal Shield Maintenance",regular,"Imperial Tech Services"
|
|
8
|
+
7,1,45.99,"2024-09-05 22:04:38","Prime Radiant Data Subscription",debit,"Seldon Psychohistory Institute"
|
|
9
|
+
8,1,350.0,"2024-08-18 09:02:44","Gravitic Repulsor Boots",debit,"Terminus Outfitters"
|
|
10
|
+
9,1,1000.0,"2024-08-24 02:31:24","Spaceship Insurance Premium",regular,"Galactic Insurers"
|
|
11
|
+
10,1,180.25,"2024-08-10 22:43:41","Galactic Standard Language Course",regular,"Imperial University of Trantor"
|
|
12
|
+
11,2,200.0,"2024-08-11 03:31:18","Energy Bill for Terminus Power",regular,"Terminus Power"
|
|
13
|
+
12,2,1200.0,"2024-09-30 02:22:24","Subscription to Encyclopedia Galactica",regular,"Encyclopedia Galactica"
|
|
14
|
+
13,2,85.75,"2024-09-11 13:02:22","Hyperwave Transceiver Repair",debit,"Foundation TechnoFix"
|
|
15
|
+
14,2,450.0,"2024-08-01 23:17:02","Subetheric Communication Package",regular,GalactiComm
|
|
16
|
+
15,2,75.0,"2024-09-02 11:37:32","Atomic Converter Fuel",debit,"Anacreon Fuel Station"
|
|
17
|
+
16,2,300.0,"2024-09-06 10:46:27","Positronic Brain Maintenance",debit,"R. Daneel Olivaw Services"
|
|
18
|
+
17,2,1800.0,"2024-09-22 21:55:55","Vault of Trantor Access Fee",debit,"Imperial Library of Trantor"
|
|
19
|
+
18,2,95.5,"2024-09-08 01:17:03","Neuronic Whip Power Cell",debit,"Imperial Armory"
|
|
20
|
+
19,2,250.0,"2024-09-14 14:34:47","Holographic Home Decor",debit,"Kalgan Luxury Imports"
|
|
21
|
+
20,2,500.0,"2024-09-09 17:18:46","Gravitic Gymnasium Membership",regular,"Trantor Fitness"
|
|
22
|
+
21,3,450.0,"2024-09-03 20:59:43","Purchase from Anacreon Traders",debit,"Anacreon Traders"
|
|
23
|
+
22,3,320.0,"2024-09-07 10:27:28","Gym Membership at Imperial Fitness",regular,"Imperial Fitness"
|
|
24
|
+
23,3,150.75,"2024-09-08 01:41:20","Galactic Cuisine Cooking Class",debit,"Synnax Culinary Academy"
|
|
25
|
+
24,3,700.0,"2024-09-29 13:33:38","Jump Drive Upgrade",debit,"Terminus Shipyards"
|
|
26
|
+
25,3,45.99,"2024-07-12 16:08:22","Mycogen Sector Fungi Supplies",debit,"Mycogen Agri-Corp"
|
|
27
|
+
26,3,1200.0,"2024-08-22 17:56:27","Personal Force Field Maintenance",regular,"Terminus Technologies"
|
|
28
|
+
27,3,80.0,"2024-09-24 02:38:36","Trantorian Postal Service",debit,"Imperial Postal Service"
|
|
29
|
+
28,3,350.0,"2024-09-23 06:28:21","Psychohistory Conference Fee",regular,"Second Foundation"
|
|
30
|
+
29,3,25.5,"2024-09-13 19:45:03","Spaceship Debris Shield Insurance",regular,"Galactic Insurers"
|
|
31
|
+
30,3,500.0,"2024-09-21 00:09:11","Mental Static Device",debit,"Second Foundation Tech"
|
|
32
|
+
31,4,300.0,"2024-07-18 18:57:48","Dinner at Star's End Diner",debit,"Star's End Diner"
|
|
33
|
+
32,4,50.0,"2024-09-28 12:23:36","Coffee at Terminus Cafe",debit,"Terminus Cafe"
|
|
34
|
+
33,4,1500.0,"2024-08-20 18:21:20","Far Star Spacecraft Lease Payment",regular,"Foundation Fleet Services"
|
|
35
|
+
34,4,75.25,"2024-07-30 06:02:46","Zero-G Yoga Class",debit,"Synnax Fitness Studio"
|
|
36
|
+
35,4,200.0,"2024-07-23 22:29:14","Galactic Dating App Subscription",regular,"Hearts Across the Stars"
|
|
37
|
+
36,4,450.0,"2024-09-20 00:42:13","Vault of Trantor Virtual Access",regular,"Imperial Library of Trantor"
|
|
38
|
+
37,4,30.5,"2024-08-21 10:17:36","Anacreon Beast Feed",debit,"Anacreon Livestock Supplies"
|
|
39
|
+
38,4,800.0,"2024-09-07 03:32:28","Personal Force Field Repair",debit,"Foundation Tech Services"
|
|
40
|
+
39,4,150.0,"2024-09-16 10:58:24","Mule's Emotional Projector Experience",debit,"Kalgan Entertainment"
|
|
41
|
+
40,4,100.0,"2024-07-31 19:52:02","Mycogen Yeast Culture Subscription",regular,"Mycogen Sector Imports"
|
|
42
|
+
41,5,600.0,"2024-09-08 02:57:02","Office Supplies from Foundation Store",debit,"Foundation Office Store"
|
|
43
|
+
42,5,1000.0,"2024-08-18 13:06:49","Trantor Docking Fee",regular,"Imperial Spaceport Authority"
|
|
44
|
+
43,5,75.5,"2024-08-04 16:30:28","Galactic Standard Translator Device",debit,"Foundation Electronics"
|
|
45
|
+
44,5,250.0,"2024-08-26 16:22:14","Visi-Sonor Tuning",debit,"Rossem Instruments"
|
|
46
|
+
45,5,350.0,"2024-09-24 03:53:18","Planetary Defense Shield Subscription",regular,"Terminus Defense Systems"
|
|
47
|
+
46,5,120.75,"2024-08-03 01:43:36","Seldon Crisis Forecast Update",debit,"Psychohistory Institute"
|
|
48
|
+
47,5,800.0,"2024-08-11 14:16:35","Artificial Gravity Generator",debit,"Foundation Physics Corp"
|
|
49
|
+
48,5,40.0,"2024-09-13 23:44:14","Concentrated Food Tablets",debit,"Foundation Nutrition"
|
|
50
|
+
49,5,500.0,"2024-07-15 03:55:28","Hyper-sleep Chamber Rental",regular,"Anacreon Travel Services"
|
|
51
|
+
50,5,150.0,"2024-08-23 18:15:31","Vault of Trantor Artifact Insurance",regular,"Galactic Treasures Assurance"
|
|
52
|
+
51,6,900.0,"2024-09-22 11:01:35","Software Subscription to Seldon Analytics",regular,"Seldon Analytics"
|
|
53
|
+
52,6,1200.0,"2024-09-16 01:55:56","Purchase of Holographic Equipment",debit,HoloTech
|
|
54
|
+
53,6,50.25,"2024-09-27 10:41:20","Atomic Coffee Subscription",regular,"Trantor Roasters"
|
|
55
|
+
54,6,300.0,"2024-08-16 22:39:15","Hyperspace Communication Charges",regular,GalactiComm
|
|
56
|
+
55,6,75.0,"2024-07-20 13:41:10","Anti-Grav Hair Styling Gel",debit,"Kalgan Cosmetics"
|
|
57
|
+
56,6,450.0,"2024-07-08 16:39:22","R. Daneel Olivaw Model Upgrade",debit,"Aurora Robotics"
|
|
58
|
+
57,6,200.0,"2024-07-31 22:59:01","Space Pirate Insurance",regular,"Galactic Risk Management"
|
|
59
|
+
58,6,100.0,"2024-08-14 00:38:37","Terminus Mining Royalties",regular,"Foundation Resources"
|
|
60
|
+
59,6,750.0,"2024-09-07 06:51:00","Jump-2 Hyperdrive System",debit,"Foundation Fleet Tech"
|
|
61
|
+
60,6,25.5,"2024-07-30 23:58:23","Gravitic Repulsion Yoga Mat",debit,"Synnax Fitness Gear"
|
|
62
|
+
61,7,150.0,"2024-07-05 04:57:25","Book Purchase from Trantor Books",debit,"Trantor Books"
|
|
63
|
+
62,7,500.0,"2024-09-30 10:36:55","Personal Force Field System",debit,"Terminus Security Solutions"
|
|
64
|
+
63,7,75.25,"2024-09-06 02:16:38","Atomic Vibro-Blade Toothbrush",debit,"Foundation Health Tech"
|
|
65
|
+
64,7,1000.0,"2024-09-01 08:59:49","Spacecraft Neural Interface Upgrade",debit,"Foundation Fleet Systems"
|
|
66
|
+
65,7,250.0,"2024-09-05 23:57:50","Holographic History Tour of Trantor",debit,"Imperial Tourism Board"
|
|
67
|
+
66,7,180.0,"2024-08-12 04:01:36","Psychohistory for Beginners Course",regular,"Seldon Institute"
|
|
68
|
+
67,7,90.5,"2024-07-12 14:27:56","Trantorian Cuisine Delivery",debit,GalactiEats
|
|
69
|
+
68,7,550.0,"2024-08-24 12:45:00","Personal Mentalic Shield",debit,"Second Foundation Tech"
|
|
70
|
+
69,7,125.75,"2024-10-02 01:53:13","Vault of Trantor Virtual Tour",debit,"Imperial Library of Trantor"
|
|
71
|
+
70,7,300.0,"2024-07-04 21:10:25","Foundation Encyclopedia Update",regular,"Encyclopedia Galactica"
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
id,name,email,phone,address,username,password,segment,created_at,updated_at
|
|
2
|
+
1,"John Smith",john.smith@example.com,0123456789,"1 Psychohistorical Way, Trantor Square, London, SW1A 1AA",john.smith,smith123,Corporate,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
3
|
+
2,"Mary Brown",mary.brown@example.com,0129876543,"2 Foundation Drive, Terminus Park, London, E1 6AN",mary.brown,brown123,Retail,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
4
|
+
3,"Dan Young",dan.young@example.com,0123345678,"3 Scholar's Lane, Asimov Gardens, London, WC1B 5HA",dan.young,young123,SME,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|