16 lines
456 B
Python
16 lines
456 B
Python
|
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")
|