12345678910111213141516171819202122 |
- <?php
- declare (strict_types = 1);
- namespace app\common\model;
- class Template extends Base
- {
- protected $schema = [
-
- ];
- public function templateType()
- {
- $this->belongsTo('TemplateType', 'typeid', 'typeid')->bind(['typename'=>'typename']);
- }
- // 获取列表
- public static function getList()
- {
- return self::with('templateType')->order(['id' => 'desc'])->select();
- }
- }
|