Added documentation to the columns of the AccountL10n data model.

This commit is contained in:
依瑪貓 2023-02-07 00:23:45 +08:00
parent d78b941674
commit cdd010427b

View File

@ -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)