forked from rDrama/rDrama
fdfd
parent
624a2e1161
commit
28807798bc
|
@ -16,6 +16,7 @@ class OauthApp(Base, Stndrd):
|
||||||
app_name = Column(String(50))
|
app_name = Column(String(50))
|
||||||
redirect_uri = Column(String(4096))
|
redirect_uri = Column(String(4096))
|
||||||
description = Column(String(256))
|
description = Column(String(256))
|
||||||
|
author_id = Column(Integer, ForeignKey("users.id"))
|
||||||
author = relationship("User")
|
author = relationship("User")
|
||||||
|
|
||||||
def __repr__(self): return f"<OauthApp(id={self.id})>"
|
def __repr__(self): return f"<OauthApp(id={self.id})>"
|
||||||
|
@ -51,5 +52,6 @@ class ClientAuth(Base, Stndrd):
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
oauth_client = Column(Integer, ForeignKey("oauth_apps.id"))
|
oauth_client = Column(Integer, ForeignKey("oauth_apps.id"))
|
||||||
access_token = Column(String(128))
|
access_token = Column(String(128))
|
||||||
|
user_id = Column(Integer, ForeignKey("users.id"))
|
||||||
user = relationship("User", lazy="joined")
|
user = relationship("User", lazy="joined")
|
||||||
application = relationship("OauthApp", lazy="joined")
|
application = relationship("OauthApp", lazy="joined")
|
Loading…
Reference in New Issue