+ def __hash__(self) -> int:
+ history_tuples = tuple((k, v) for k, v in self.history.items())
+ hashable = (self.parent.id_, self.table_name, self.default,
+ history_tuples)
+ return hash(hashable)
+
+ @property
+ def as_dict(self) -> dict[str, object]:
+ """Return self as (json.dumps-coompatible) dict."""
+ d = {'parent_id': self.parent.id_,
+ 'table_name': self.table_name,
+ 'history': self.history}
+ return d
+