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 `FilingStepDAO(Base):`{
__tablename__ = "filing_step"
step: Mapped[str] = mapped_column#40;primary_key=True#41;
}
class `CompletedFilingStepDAO(AuditMixin, Base):`{
__tablename__ = "filing"
filing: Mapped[str] = mapped_column#40;ForeignKey#40;"filing.id"#41;, primary_key=True#41;
step: Mapped[str] = mapped_column#40;ForeignKey#40;"filing_step.step"#41;, primary_key=True#41;
submitter: Mapped[str]
}
class `FilingDAO(AuditMixin, Base):`{
__tablename__ = "filing"
id: Mapped[int] = mapped_column#40;primary_key=True, autoincrement=True#41;
lei: Mapped[str]
completed_steps: Mapped[List[CompletedFilingStepDAO]] = relationship#40;#41;
filing_period = Mapped[str] = mapped_column(ForeignKey#40;"filing_period.id"#41;#41;
institution_snapshot_id = Mapped[str]
contact_info: Mapped[str] = mapped_column(nullable=True)
}
class `FilingPeriodDAO(AuditMixin, Base):`{
__tablename__ = "filing_period"
id: Mapped[int] = mapped_column#40;primary_key=True, autoincrement=True#41;
name: Mapped[str]
start_period: Mapped[datetime]
end_period: 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]
state: Mapped[SubmissionState] = mapped_column#40;Enum#40;SubmissionState#41;#41;
validation_ruleset_version: Mapped[str]
validation_json: Mapped[dict[str, Any]] = mapped_column#40;JSON, nullable=True#41;
filing: Mapped[str] = mapped_column#40;ForeignKey#40;"filing.id"#41;#41;
confirmation_id: Mapped[str] = mapped_column#40;nullable=True#41;
}
`FilingPeriodDAO(AuditMixin, Base):` *-- `FilingDAO(AuditMixin, Base):`
`FilingDAO(AuditMixin, Base):` *-- `SubmissionDAO(AuditMixin, Base):`
`FilingDAO(AuditMixin, Base):` *-- `CompletedFilingStepDAO(AuditMixin, Base):`
`CompletedFilingStepDAO(AuditMixin, Base):` *-- `FilingStepDAO(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