import sqlalchemy as sql
from database.schemas.schema import Schema, Base

class Quote(Schema, Base):
    __tablename__ = 'quotes'

    id          = sql.Column(sql.Integer, primary_key=True)
    quoted_user = sql.Column(sql.String(32), nullable=False)
    quoted_by   = sql.Column(sql.String(32), nullable=False)
    quote       = sql.Column(sql.String(255), nullable=False)
    during_game = sql.Column(sql.String(80), nullable=False)
    approved    = sql.Column(sql.Boolean, nullable=False, default=False)
    created     = sql.Column(sql.DateTime, nullable=True, default=Schema.update_datetime)
    updated     = sql.Column(sql.DateTime, nullable=True, onupdate=Schema.update_datetime)