dodil/erp-brick-consolidation

DODIL ERP brick: consolidation

src/brick_consolidation/domain/values.py

"""Value objects: the states each lifecycle may be in, and the attributes with a fixed set of values.

Stored as their plain strings; naming them here makes a typo a NameError, not a new state.
Generated by `erp-compose scaffold` from module.yaml.
"""
from enum import Enum


class GroupStructureMethod(str, Enum):
    """group_structure.method: the values the spec allows"""
    FULL = "full"
    EQUITY = "equity"
    NONE = "none"


class AccountRuleRateType(str, Enum):
    """account_rule.rate_type: the values the spec allows"""
    CLOSING = "closing"
    AVERAGE = "average"
    HISTORICAL = "historical"


class EliminationRuleKind(str, Enum):
    """elimination_rule.kind: the values the spec allows"""
    IC_BALANCE = "ic_balance"
    IC_PL = "ic_pl"
    DIVIDEND = "dividend"


class GroupPeriodState(str, Enum):
    """group_period: its lifecycle states (module.yaml workflows)"""
    OPEN = "open"
    COLLECTED = "collected"
    TRANSLATED = "translated"
    ELIMINATED = "eliminated"
    SIGNED = "signed"


class ReportedDataSource(str, Enum):
    """reported_data.source: the values the spec allows"""
    GL = "gl"
    UPLOAD = "upload"


class UploadStatus(str, Enum):
    """upload.status: the values the spec allows"""
    SUBMITTED = "submitted"
    ACCEPTED = "accepted"
    REPLACED = "replaced"


class StructureChangeState(str, Enum):
    """structure_change: its lifecycle states (module.yaml workflows)"""
    PROPOSED = "proposed"
    EFFECTIVE = "effective"
    REJECTED = "rejected"


class ConsJournalState(str, Enum):
    """cons_journal: its lifecycle states (module.yaml workflows)"""
    PROPOSED = "proposed"
    POSTED = "posted"
    REJECTED = "rejected"
    REVERSED = "reversed"


class ConsJournalDocumentType(str, Enum):
    """cons_journal.document_type: the values the spec allows"""
    TRANSLATION = "translation"
    IC_BALANCE = "ic_balance"
    IC_PL = "ic_pl"
    DIVIDEND = "dividend"
    STOCK_PROFIT = "stock_profit"
    INVESTMENT = "investment"
    NCI = "nci"
    EQUITY_METHOD = "equity_method"
    DISPOSAL = "disposal"
    OWNERSHIP_CHANGE = "ownership_change"
    MANUAL = "manual"
    CARRY_FORWARD = "carry_forward"
    MIGRATION = "migration"


class ConsMigrationRunState(str, Enum):
    """cons_migration_run: its lifecycle states (module.yaml workflows)"""
    LOADED = "loaded"
    RECONCILED = "reconciled"
    SIGNED = "signed"
    DISCARDED = "discarded"