- Add FastAPI service for managing oil delivery services - Implement service scheduling and management endpoints - Add customer service history tracking - Include database models for services, customers, and auto-delivery - Add authentication and authorization middleware - Configure Docker support for local, dev, and prod environments - Add comprehensive .gitignore for Python projects
29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
from sqlalchemy import Column, Integer, String, Numeric, Date
|
|
from database import Base
|
|
|
|
|
|
class Auto_Delivery(Base):
|
|
"""Read-only auto delivery model for syncing hot_water_summer."""
|
|
__tablename__ = 'auto_delivery'
|
|
__table_args__ = {"schema": "public"}
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
customer_id = Column(Integer)
|
|
account_number = Column(String(25))
|
|
customer_town = Column(String(140))
|
|
customer_state = Column(Integer)
|
|
customer_address = Column(String(1000))
|
|
customer_zip = Column(String(25))
|
|
customer_full_name = Column(String(250))
|
|
last_fill = Column(Date)
|
|
days_since_last_fill = Column(Integer)
|
|
last_updated = Column(Date)
|
|
estimated_gallons_left = Column(Numeric(6, 2))
|
|
estimated_gallons_left_prev_day = Column(Numeric(6, 2))
|
|
tank_height = Column(String(25))
|
|
tank_size = Column(String(25))
|
|
house_factor = Column(Numeric(5, 2))
|
|
hot_water_summer = Column(Integer)
|
|
auto_status = Column(Integer)
|
|
open_ticket_id = Column(Integer)
|