新增 validate_ref_entities 异步函数,在 create/update 时检查 ref_entity 字段指向的记录是否存在于对应动态表中。自引用 场景下 create 跳过校验,update 跳过自身引用。