init
- 框架初始化 - 安装插件 - 修复PHP8.4报错
This commit is contained in:
24
application/admin/model/shopro/user/Address.php
Normal file
24
application/admin/model/shopro/user/Address.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model\shopro\user;
|
||||
|
||||
use app\admin\model\shopro\Common;
|
||||
|
||||
class Address extends Common
|
||||
{
|
||||
protected $name = 'shopro_user_address';
|
||||
|
||||
protected $type = [
|
||||
'is_default' => 'boolean'
|
||||
];
|
||||
|
||||
// 追加属性
|
||||
protected $append = [];
|
||||
|
||||
|
||||
public function scopeDefault($query)
|
||||
{
|
||||
return $query->where('is_default', 1);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user