# Written from the process, before any folder is opened.class ExpectedPiece(BaseModel): """One row of what a case type demands, filed or not.""" role: str # the business word: "loss adjuster report" min_count: int # 0 when the piece is optional max_count: int | None # None when any number of them is fine required_when: str | None # a condition on the case's own fields blocks_payment: bool # can the case move on while this is absentPROPERTY_DAMAGE_CLAIM = [ ExpectedPiece(role="claim form", min_count=1, max_count=1, required_when=None, blocks_payment=True), ExpectedPiece(role="fire brigade report", min_count=1, max_count=1, required_when="cause_of_loss == 'fire'", blocks_payment=True), ExpectedPiece(role="repair invoice", min_count=1, max_count=None, required_when="accepted_quotes >= 1", blocks_payment=True), ExpectedPiece(role="correspondence", min_count=0, max_count=None, required_when=None, blocks_payment=False),]