Adding authnet not tested
This commit is contained in:
@@ -5,13 +5,13 @@ from .database import Base
|
||||
import datetime
|
||||
|
||||
class Customer(Base):
|
||||
__tablename__ = "customers"
|
||||
__tablename__ = "customer_customer"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
|
||||
# --- ADD THIS COLUMN ---
|
||||
# This stores the master profile ID from Authorize.Net's CIM.
|
||||
auth_net_profile_id = Column(String, unique=True, index=True, nullable=True)
|
||||
auth_net_profile_id = Column(String(100))
|
||||
|
||||
# --- YOUR EXISTING COLUMNS ---
|
||||
account_number = Column(String(25))
|
||||
@@ -34,17 +34,17 @@ class Customer(Base):
|
||||
|
||||
# --- ADD THIS ENTIRE NEW MODEL ---
|
||||
class Card(Base):
|
||||
__tablename__ = "cards"
|
||||
__tablename__ = "card_card"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
customer_id = Column(Integer, ForeignKey("customers.id"), nullable=False, index=True)
|
||||
user_id = Column(Integer, nullable=False)
|
||||
|
||||
# This stores the payment profile ID for this specific card from Authorize.Net's CIM.
|
||||
auth_net_payment_profile_id = Column(String, unique=True, index=True, nullable=False)
|
||||
|
||||
# Columns to store non-sensitive card info for display purposes
|
||||
last_four = Column(String(4), nullable=False)
|
||||
card_brand = Column(String(50), nullable=True)
|
||||
last_four_digits = Column(String(4), nullable=False)
|
||||
type_of_card = Column(String(50), nullable=True)
|
||||
expiration_month = Column(Integer, nullable=False)
|
||||
expiration_year = Column(Integer, nullable=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user