platypush/platypush/entities/devices.py

15 lines
351 B
Python
Raw Normal View History

from sqlalchemy import Column, Integer, Boolean, ForeignKey
from ._base import Entity
class Device(Entity):
__tablename__ = 'device'
2022-04-13 11:25:14 +02:00
id = Column(Integer, ForeignKey(Entity.id, ondelete='CASCADE'), primary_key=True)
reachable = Column(Boolean, default=True)
__mapper_args__ = {
'polymorphic_identity': __tablename__,
}