from .. import db
from .kds_base import KDSBase

# from .point_mesure_capteur import PointMesureCapteur
class KDSObject(KDSBase):
    __tablename__ = "kds_object"
    # Columns
    obj_object_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    obj_parent_id = db.Column(db.Integer)
    obj_kitchen_id = db.Column(db.Integer)
    obj_reference = db.Column(db.Text)
    obj_type = db.Column(db.Text)
    obj_json = db.Column(db.Text)
    obj_status = db.Column(db.Text)
    obj_create_dt = db.Column(db.DateTime, default=db.func.current_timestamp())
    obj_update_dt = db.Column(
        db.DateTime,
        default=db.func.current_timestamp(),
        onupdate=db.func.current_timestamp(),
    )
    # relations

    
    def __repr__(self):
        return "<KDSObject %r>" % (self.obj_reference)
