1234567891011121314151617181920 |
- <?php
- namespace app\common\model;
- use think\Model;
- class ComjobsCate extends Model
- {
- // 设置字段信息
- protected $schema = [
- 'id' => 'int',
- 'pid' => 'int',
- 'title' => 'string',
- 'priority' => 'int'
- ];
- public function pcate()
- {
- return $this->hasOne(ComjobsCate::class,'id','pid');
- }
- }
|