1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\admin\model\wechat;
- use crmeb\traits\ModelTrait;
- use crmeb\basic\BaseModel;
- class WechatTemplate extends BaseModel
- {
-
- protected $pk = 'id';
-
- protected $name = 'template_message';
- use ModelTrait;
- public static function vialdWhere(string $alias = '', int $type = 1)
- {
- if ($alias) {
- $alias .= '.';
- }
- return self::where($alias . 'type', $type);
- }
-
- public static function systemPage($where = array())
- {
- $model = self::vialdWhere();
- if ($where['name'] !== '') $model = $model->where('name', 'LIKE', "%$where[name]%");
- if ($where['status'] !== '') $model = $model->where('status', $where['status']);
- return self::page($model);
- }
- }
|