First step to linked loans
This commit was merged in pull request #20.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Environment Variables
|
||||
BASIC_AUTH_USERNAME=user
|
||||
BASIC_AUTH_PASSWORD=password
|
||||
|
||||
#swagger Configuration
|
||||
SWAGGER_URL="/documentation"
|
||||
API_URL="/swagger.json"
|
||||
|
||||
# Database Configuration
|
||||
DATABASE_USER=firstadvance
|
||||
DATABASE_PASSWORD=FirstAdvance!
|
||||
DATABASE_HOST=dev-data.simbrellang.net
|
||||
DATABASE_PORT=10532
|
||||
DATABASE_NAME=firstadvancedev
|
||||
|
||||
# DATABASE_HOST=10.20.30.60
|
||||
# DATABASE_USER=firstadvance
|
||||
# DATABASE_PASSWORD=firstadvance
|
||||
# DATABASE_NAME=firstadvancedev
|
||||
# DATABASE_PORT=5432
|
||||
|
||||
# Flask Configuration
|
||||
FLASK_APP=wsgi.py
|
||||
FLASK_ENV=development
|
||||
APP_PORT=4500
|
||||
|
||||
|
||||
# Bank Call Service Connection
|
||||
SIMBRELLA_BASE_URL="https://bank-emulator.dev.simbrellang.net"
|
||||
VALID_APP_ID=app1
|
||||
VALID_API_KEY=test-api-key-12345
|
||||
|
||||
|
||||
# Event Bus Broker Configuration
|
||||
KAFKA_BROKER="10.0.0.246:9092"
|
||||
+2
-1
@@ -31,7 +31,8 @@ class Config:
|
||||
"JWT_REFRESH_TOKEN_EXPIRES", timedelta(days=30)
|
||||
)
|
||||
|
||||
KAFKA_BROKER = 'dev-events.simbrellang.net:9085'
|
||||
# KAFKA_BROKER = 'dev-events.simbrellang.net:9085'
|
||||
KAFKA_BROKER = os.getenv("KAFKA_BROKER", "dev-events.simbrellang.net:9085")
|
||||
|
||||
|
||||
settings = Config()
|
||||
|
||||
@@ -17,6 +17,7 @@ class Loan(db.Model):
|
||||
)
|
||||
customer_id = db.Column(db.String(50), nullable=False)
|
||||
transaction_id = db.Column(db.String(50), nullable=True)
|
||||
original_transaction = db.Column(db.String(50), nullable=True)
|
||||
account_id = db.Column(db.String(50), nullable=False)
|
||||
offer_id = db.Column(db.String(20), nullable=False)
|
||||
product_id = db.Column(db.String(20), nullable=True)
|
||||
@@ -85,6 +86,7 @@ class Loan(db.Model):
|
||||
product_id = product_id,
|
||||
collection_type = collection_type,
|
||||
transaction_id = transaction_id,
|
||||
original_transaction = transaction_id,
|
||||
initial_loan_amount = initial_loan_amount,
|
||||
current_loan_amount = initial_loan_amount,
|
||||
upfront_fee = upfront_fee,
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
"""Migration on Sat Apr 26 19:02:17 UTC 2025
|
||||
|
||||
Revision ID: eb99c7fb9e09
|
||||
Revises: 89759cebb9c6
|
||||
Create Date: 2025-04-26 19:02:20.443678
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'eb99c7fb9e09'
|
||||
down_revision = '89759cebb9c6'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('loans', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('original_transaction', sa.String(length=50), nullable=True))
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('loans', schema=None) as batch_op:
|
||||
batch_op.drop_column('original_transaction')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user