Update manifest.json and infra README
- Updated timestamps and AST hashes in manifest.json for various backend and frontend files to reflect recent changes. - Added new files related to MCC categories and optional hold reasons in the manifest. - Modified the README in the infra directory to correct the linting tool from 'mypy' to 'ty' for type checking in the backend project.
This commit is contained in:
@@ -100,6 +100,34 @@ class MccCode(Base):
|
||||
dictionary_version: Mapped[int] = mapped_column(nullable=False, default=1)
|
||||
|
||||
|
||||
class CategoryMcc(Base, PkMixin):
|
||||
"""Space-scoped MCC codes of a category: many codes per category, but every
|
||||
code maps to at most one category inside the space."""
|
||||
|
||||
__tablename__ = "category_mcc_codes"
|
||||
__table_args__ = (
|
||||
UniqueConstraint("space_id", "mcc_code", name="uq_category_mcc_space_code"),
|
||||
ForeignKeyConstraint(
|
||||
["space_id", "category_id"],
|
||||
["categories.space_id", "categories.id"],
|
||||
ondelete="CASCADE",
|
||||
name="fk_category_mcc_category_tenant",
|
||||
),
|
||||
ForeignKeyConstraint(
|
||||
["mcc_code"],
|
||||
["mcc_codes.code"],
|
||||
ondelete="RESTRICT",
|
||||
name="fk_category_mcc_dictionary",
|
||||
),
|
||||
)
|
||||
|
||||
space_id: Mapped[uuid.UUID] = mapped_column(
|
||||
Uuid, ForeignKey("financial_spaces.id", ondelete="CASCADE"), nullable=False, index=True
|
||||
)
|
||||
category_id: Mapped[uuid.UUID] = mapped_column(Uuid, nullable=False, index=True)
|
||||
mcc_code: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
|
||||
|
||||
class BankCategoryMapping(Base, PkMixin):
|
||||
"""Maps a bank's raw category string to an MCC for suggestion purposes."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user