要在 SQLAlchemy 中定义具有嵌套
children 关系的表,如表中包含
id
pid 字段,可以使用
relationship
ForeignKey 来建立父子关系。