41 lines
1.4 KiB
Python
41 lines
1.4 KiB
Python
## File: your_app/models.py
|
|
|
|
from sqlalchemy import Column, Integer, String, Float, DateTime, Boolean, ForeignKey, Numeric
|
|
from .database import Base
|
|
import datetime
|
|
|
|
class Customer(Base):
|
|
__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(100))
|
|
|
|
# --- YOUR EXISTING COLUMNS ---
|
|
account_number = Column(String(25))
|
|
customer_last_name = Column(String(250))
|
|
customer_first_name = Column(String(250))
|
|
customer_town = Column(String(140))
|
|
customer_state = Column(Integer)
|
|
customer_zip = Column(String(25))
|
|
customer_first_call = Column(DateTime)
|
|
customer_email = Column(String(500))
|
|
customer_automatic = Column(Integer)
|
|
customer_phone_number = Column(String(25))
|
|
customer_home_type = Column(Integer)
|
|
customer_apt = Column(String(140))
|
|
customer_address = Column(String(1000))
|
|
company_id = Column(Integer)
|
|
customer_latitude = Column(String(250))
|
|
customer_longitude = Column(String(250))
|
|
correct_address = Column(Boolean)
|
|
|
|
# --- ADD THIS ENTIRE NEW MODEL ---
|
|
class Call(Base):
|
|
__tablename__ = "call_call"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
current_phone = Column(String(500))
|
|
created_at = Column(DateTime, default=datetime.datetime.utcnow) |