from app.extensions.db import db


class UserEvents(db.Model):
    __tablename__ = "user_events"
    id = db.Column(db.Integer, primary_key=True)
    chat_id = db.Column(db.Integer, nullable=False)
    telegram_id = db.Column(db.String(80), nullable=False)
    action = db.Column(db.String(500), nullable=False)
    timestamp = db.Column(db.DateTime, default=db.func.current_timestamp())