serialize(self) get_project(session, project_string_id) get_users_current_project(session)
| 21 | |
| 22 | |
| 23 | class Project(Base, Caching): |
| 24 | """ |
| 25 | serialize(self) |
| 26 | get_project(session, project_string_id) |
| 27 | get_users_current_project(session) |
| 28 | """ |
| 29 | |
| 30 | __tablename__ = 'project' |
| 31 | |
| 32 | id = Column(Integer, primary_key = True) |
| 33 | name = Column(String(250)) |
| 34 | |
| 35 | is_public = Column(Boolean) |
| 36 | |
| 37 | goal = Column(String()) |
| 38 | |
| 39 | # TODO update / add these fields in sandbox DB |
| 40 | deletion_pending = Column(Boolean) # NEW, renamed from soft_remove |
| 41 | deletion_id = Column(Integer, ForeignKey('deletion.id')) |
| 42 | deletion = relationship("Deletion", foreign_keys = [deletion_id]) |
| 43 | |
| 44 | highest_ai_version_number = Column(Integer, default = 0) |
| 45 | |
| 46 | star_count = Column(Integer, default = 0) |
| 47 | star_list = relationship("ProjectStar") |
| 48 | |
| 49 | latest_issue_number = Column(Integer, default = 0) |
| 50 | discussion_list = relationship("Discussion", back_populates = "project") |
| 51 | |
| 52 | credit_balance = Column(Float()) # Maybe this should be by billing account or something? |
| 53 | project_string_id = Column(String(100), index = True) # Added index |
| 54 | |
| 55 | user_primary_id = Column(Integer, ForeignKey('userbase.id')) |
| 56 | user_primary = relationship("User", foreign_keys = [user_primary_id]) |
| 57 | # TODO clarify difference between user primary |
| 58 | # and member created? |
| 59 | |
| 60 | users = association_proxy('userbase_projects', 'userbase') |
| 61 | |
| 62 | # TODO review, not being used? |
| 63 | # activity_list = relationship("Activity", back_populates="project") |
| 64 | |
| 65 | directory_list = relationship("Project_Directory_List", back_populates = "project") |
| 66 | |
| 67 | directory_default_id = Column(Integer, ForeignKey('working_dir.id')) |
| 68 | directory_default = relationship("WorkingDir", |
| 69 | foreign_keys = [directory_default_id]) |
| 70 | |
| 71 | default_report_dashboard_id = Column(Integer, ForeignKey('report_dashboard.id')) |
| 72 | # order of this loading is not quite right |
| 73 | # default_report_dashboard = relationship("ReportDashboard", |
| 74 | # foreign_keys=[default_report_dashboard_id]) |
| 75 | |
| 76 | api_billing_enabled = Column(Boolean) |
| 77 | |
| 78 | tag_list = association_proxy('project_tag_junction', 'tag') |
| 79 | |
| 80 | annotations_feedback_loop_trigger_check = Column(Boolean()) |
no outgoing calls
no test coverage detected