12345678910111213141516171819202122232425262728 |
- <?php
- namespace app\admin\model\cms;
- use think\Model;
- class Issue extends Model
- {
- // 表名
- protected $name = 'cms_issue';
- // 自动写入时间戳字段
- protected $autoWriteTimestamp = 'int';
- // 定义时间戳字段名
- protected $createTime = 'createtime';
- protected $updateTime = 'updatetime';
- public function user()
- {
- return $this->belongsTo("\app\common\model\User", 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
- }
- public function journal()
- {
- return $this->belongsTo('\app\admin\model\cms\Channel', 'journal', 'id', [], 'LEFT')->setEagerlyType(0);
- }
- }
|