2022-04-04 16:50:17 +02:00
|
|
|
from sqlalchemy import Column, Integer, ForeignKey, Boolean
|
|
|
|
|
|
|
|
from .devices import Device
|
|
|
|
|
|
|
|
|
|
|
|
class Switch(Device):
|
|
|
|
__tablename__ = 'switch'
|
|
|
|
|
2022-04-13 11:25:14 +02:00
|
|
|
id = Column(Integer, ForeignKey(Device.id, ondelete='CASCADE'), primary_key=True)
|
2022-04-04 16:50:17 +02:00
|
|
|
state = Column(Boolean)
|
|
|
|
|
|
|
|
__mapper_args__ = {
|
|
|
|
'polymorphic_identity': __tablename__,
|
|
|
|
}
|