14 lines
578 B
Python
14 lines
578 B
Python
def serialize_stage_transition(row) -> dict:
|
|
return {
|
|
"id": str(row.id),
|
|
"inbox_id": row.inbox_id,
|
|
"from_stage": row.from_stage,
|
|
"to_stage": row.to_stage,
|
|
"valid_from": row.valid_from.isoformat() if row.valid_from else None,
|
|
"valid_to": row.valid_to.isoformat() if row.valid_to else None,
|
|
"changed_by": str(row.changed_by) if row.changed_by else None,
|
|
"actor_kind": row.actor_kind,
|
|
"change_reason": row.change_reason,
|
|
"created_at": row.created_at.isoformat() if row.created_at else None,
|
|
}
|