12345678910111213141516171819202122232425 |
- <?php
- namespace app\admin\model;
- class ChannelCat extends Base
- {
- //设置字段信息
- protected $schema = [
- 'id' =>'bigint',//
- 'channel_id' =>'bigint',//
- 'cat_id' =>'bigint',//
- 'rate' =>'decimal',//
- 'apply_id' =>'int',//
- 'apply_name' =>'varchar',//
- 'status' =>'tinyint',//
- 'is_del' =>'tinyint',//
- 'addtime' =>'datetime',//
- 'updatetime' =>'datetime',//
- ];
- protected $createTime='addtime';
- protected $updateTime='updatetime';
- public function CatInfo(){
- return $this->belongsTo('Cat','cat_id')->bind(['cat_name'=>'cat_name',"cat_search"=>"search"]);
- }
- }
|