From cdd010427bd8b2a69d2350b73fe8edcf5d97a802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 7 Feb 2023 00:23:45 +0800 Subject: [PATCH] Added documentation to the columns of the AccountL10n data model. --- src/accounting/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/accounting/models.py b/src/accounting/models.py index e3d846a..187a639 100644 --- a/src/accounting/models.py +++ b/src/accounting/models.py @@ -305,13 +305,18 @@ class Account(db.Model): class AccountL10n(db.Model): """A localized account title.""" __tablename__ = "accounting_accounts_l10n" + """The table name.""" account_id = db.Column(db.Integer, db.ForeignKey(Account.id, onupdate="CASCADE", ondelete="CASCADE"), nullable=False, primary_key=True) + """The account ID.""" account = db.relationship(Account, back_populates="l10n") + """The account.""" locale = db.Column(db.String, nullable=False, primary_key=True) + """The locale.""" title = db.Column(db.String, nullable=False) + """The localized title.""" db.UniqueConstraint(account_id, locale)