mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-30 00:14:19 +00:00
14 lines
467 B
Python
14 lines
467 B
Python
|
"""
|
||
|
This module defines the Uses database class.
|
||
|
"""
|
||
|
|
||
|
from ..base import Base
|
||
|
|
||
|
|
||
|
class Uses(Base.Model):
|
||
|
__tablename__ = "uses"
|
||
|
rid = Base.Column(Base.Integer, Base.ForeignKey("repository.id"), primary_key=True)
|
||
|
cid = Base.Column(Base.Integer, Base.ForeignKey("condition.id"), primary_key=True)
|
||
|
# Relationships
|
||
|
repository = Base.relationship("Repository", back_populates="uses")
|
||
|
condition = Base.relationship("Condition", back_populates="used")
|