From e4d2a3cbadc5943942923fc728affd2a79cfb410 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 20 Feb 2025 16:10:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0getSuffix=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/concern/DbConnect.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/model/concern/DbConnect.php b/src/model/concern/DbConnect.php index 8adf9465..09e5d7ca 100644 --- a/src/model/concern/DbConnect.php +++ b/src/model/concern/DbConnect.php @@ -146,6 +146,15 @@ public function replace(bool $replace = true) return $this; } + /** + * 获取当前模型的数据表后缀 + * + * @return string + */ + public function getSuffix(): string + { + return $this->getOption('suffix', ''); + } /** * 设置当前模型数据表的后缀