# Path: APITaxi_models2/mixins.py
# class HistoryMixin:
#     added_at = db.Column(db.DateTime)
#     added_via = db.Column(db.Enum('form', 'api', name='sources'), nullable=False)
#     source = db.Column(db.String(255), nullable=False)
#     last_update_at = db.Column(db.DateTime)


from . import db
from .mixins import HistoryMixin


class Customer(HistoryMixin, db.Model):

    def __repr__(self):
        return '<Customer %s (added_by id %s)>' % (self.id, self.added_by_id)

    id = db.Column(db.String, primary_key=True)

# Path: APITaxi_models2/mixins.py
# class HistoryMixin:
#     added_at = db.Column(db.DateTime)
#     added_via = db.Column(db.Enum('form', 'api', name='sources'), nullable=False)
#     source = db.Column(db.String(255), nullable=False)
#     last_update_at = db.Column(db.DateTime)


# Path: APITaxi_models2/customer.py
from . import db
from .mixins import HistoryMixin



class Customer(HistoryMixin, db.Model):

    def __repr__(self):
        return '<Customer %s (added_by id %s)>' % (self.id, self.added_by_id)

    id = db.Column(db.String, primary_key=True)

    added_by_id = db.Column('added_by', db.Integer, db.ForeignKey('user.id'), primary_key=True)