generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Data Diagram
jcadam14 edited this page Jan 24, 2024
·
6 revisions
---
title: Filing API Database Classes
---
classDiagram
class `FilingDAO(AuditMixin, Base):`{
__tablename__ = "filing"
id: Mapped[int] = mapped_column#40;primary_key=True, autoincrement=True#41;
lei: Mapped[str]
state: Mapped[FilingState] = mapped_column#40;Enum#40;FilingState#41;#41;
filing_period = Mapped[str] = mapped_column(ForeignKey#40;"filing_period.id"#41;#41;
institution_snapshot_id = Mapped[str] # not sure what this is
}
class `FilingPeriodDAO(AuditMixin, Base):`{
__tablename__ = "filing_period"
id: Mapped[int] = mapped_column#40;primary_key=True, autoincrement=True#41;
name: Mapped[str]
start: Mapped[datetime]
end: Mapped[datetime]
due: Mapped[datetime]
filing_type: Mapped[FilingType] = mapped_column#40;Enum#40;FilingType#41;#41;
}
class `SubmissionDAO(AuditMixin, Base):`{
__tablename__ = "submission"
id: Mapped[str] = mapped_column#40;index=True, primary_key=True#41;
submitter: Mapped[str] # user_id instead?
results: Mapped[List["FindingDAO"]] = relationship#40;back_populates="submission"#41;
state: Mapped[SubmissionState] = mapped_column#40;Enum#40;SubmissionState#41;#41;
validation_ruleset_version: Mapped[str]
json_dump: Mapped[dict[str, Any]] = mapped_column#40;JSON, nullable=True#41;
filing: Mapped[str] = mapped_column#40;ForeignKey#40;"filing.id"#41;#41;
}
`FilingPeriodDAO(AuditMixin, Base):` *-- `FilingDAO(AuditMixin, Base):`
`FilingDAO(AuditMixin, Base):` *-- `SubmissionDAO(AuditMixin, Base):`
- Filing Period JSON
- Filing JSON
- SnapshotUpdate JSON
- Contact Info JSON
- Submission JSON
- Validation JSON
- Voluntary JSON
- Sequences ‐ Get Filing Periods
- Sequences ‐ Get Filing
- Sequences ‐ Create New Filing
- Sequences ‐ Update Filing
- Sequences ‐ Get Submission
- Sequences ‐ Post Submission
- Sequences ‐ Validate Submission
- Sequences ‐ Get Contact Info
- Sequences ‐ Update Contact Info
- Sequences ‐ Sign Filing
- Sequences ‐ Verify LEI is Active