from ... import db
from .base_model import Base


class DBKitchen(Base):
    __tablename__ = "kds_kitchen"

    # Columns with data types
    kth_kitchen_id: int = db.Column(db.Integer, primary_key=True, autoincrement=True)
    kth_kitchen: str = db.Column(db.Text)
    kth_status: str = db.Column(db.Text)
    kth_create_dt = db.Column(db.DateTime, default=db.func.current_timestamp())
    kth_update_dt = db.Column(
        db.DateTime,
        default=db.func.current_timestamp(),
        onupdate=db.func.current_timestamp(),
    )

    # relations

    def __repr__(self):
        return "<Object %r>" % (self.kth_kitchen)
