"""Revenue By Nr Model.""" from sqlalchemy import Column from sqlalchemy import Integer from sqlalchemy.engine import Row from moneyhub.models.snowflake_base import BaseModel class RevenueNr(BaseModel): """Revenue By Nr model.""" __tablename__ = 'revenue_nr_dbt' account_id = Column(Integer, nullable=False, primary_key=True) @classmethod def get_by_account_id( cls, account_id: int ) -> Row: """GET nr revenue for a specified account ID. Args: account_id (int): the id of an account Returns: list: list of nr revenue """ return cls.query.filter(cls.account_id == account_id).first()