toArray(); } public static function getHouseInfo($idCard) { if (\StrUtil::isEmpOrNull($idCard)) { return null; } $where = []; $where[] = ["idCard", "=", $idCard]; return houseInfoModel::where($where)->find(); } public static function getChildren($id) { $where = []; $where[] = ["pId", "=", $id]; return houseChildModel::where($where)->select()->toArray(); } public static function getChildrenById($id) { return houseChildModel::where($where)->find($id); } public static function deleteById($id) { $data["id"] = $id; $data["delete"] = 1; $data["deleteUser"] = session("user")["uid"]; $data["deleteTime"] = date("Y-m-d H:i:s"); return houseModel::update($data); } public static function deleteChildrenById($id) { return houseChildModel::where("id", $id)->delete(); } }