simple-ocpp-cs/src/models/chargepoint.py

16 lines
456 B
Python
Raw Normal View History

2024-03-28 21:23:25 +01:00
from sqlalchemy import Boolean, Column, DateTime, String
from sqlalchemy.orm import relationship
from database import Base
class ChargePoint(Base):
__tablename__ = "chargepoints"
id = Column(String, primary_key=True)
friendly_name = Column(String, unique=True, index=True)
is_active = Column(Boolean, default=True)
password = Column(String)
last_seen = Column(DateTime, nullable=True)
connectors = relationship("Connector")