Commit c4c38dfc by aa.gusti

partner

1 parent ee8de6ab
...@@ -7,6 +7,8 @@ from sqlalchemy import ( ...@@ -7,6 +7,8 @@ from sqlalchemy import (
SmallInteger, SmallInteger,
DateTime DateTime
) )
from . import DefaultModel
from sqlalchemy.orm import ( from sqlalchemy.orm import (
relationship, relationship,
backref backref
...@@ -83,3 +85,8 @@ class Partner(Base, PartnerModel): ...@@ -83,3 +85,8 @@ class Partner(Base, PartnerModel):
if not row: if not row:
row = cls.query().filter_by(mobile=ident).first() row = cls.query().filter_by(mobile=ident).first()
return row return row
class PartnerUserModel(Base, DefaultModel):
__tablename__ = 'partner_user'
partner_id = Column(Integer, ForeignKey(Partner.id))
user_id = Column(Integer, ForeignKey(User.id))
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!