mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 21:14:18 +00:00
013ce17aa8
All initial database classes are now properly implemented. Hurray!
13 lines
No EOL
467 B
Python
13 lines
No EOL
467 B
Python
"""
|
|
This module defines the Authorization database class.
|
|
"""
|
|
|
|
from ..base import Base
|
|
|
|
|
|
class Authorization(Base.Model):
|
|
rid = Base.Column(Base.Integer, Base.ForeignKey("repository.id"), primary_key=True)
|
|
email = Base.Column(Base.String, Base.ForeignKey("user.email"), primary_key=True)
|
|
# Relationships
|
|
repository = Base.relationship("Repository", back_populates="authorizations")
|
|
user = Base.relationship("User", back_populates="authorizations") |