Add transaction_time field to DCA payments: Updated the database schema to include a new transaction_time column in the dca_payments table, modified the CreateDcaPaymentData model to accept transaction_time, and adjusted the create_dca_payment function to store the original ATM transaction time. Updated transaction processing to capture this new field.

This commit is contained in:
padreug 2025-06-22 16:50:27 +02:00
parent 18323dc0c8
commit 3a2f10f949
4 changed files with 20 additions and 4 deletions

View file

@ -67,6 +67,7 @@ class CreateDcaPaymentData(BaseModel):
transaction_type: str # 'flow', 'fixed', 'manual', 'commission'
lamassu_transaction_id: Optional[str] = None
payment_hash: Optional[str] = None
transaction_time: Optional[datetime] = None # Original ATM transaction time
class DcaPayment(BaseModel):
@ -80,6 +81,7 @@ class DcaPayment(BaseModel):
payment_hash: Optional[str]
status: str # 'pending', 'confirmed', 'failed'
created_at: datetime
transaction_time: Optional[datetime] = None # Original ATM transaction time
# Client Balance Summary