ChannelCat.php 721 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\admin\model;
  3. class ChannelCat extends Base
  4. {
  5. //设置字段信息
  6. protected $schema = [
  7. 'id' =>'bigint',//
  8. 'channel_id' =>'bigint',//
  9. 'cat_id' =>'bigint',//
  10. 'rate' =>'decimal',//
  11. 'apply_id' =>'int',//
  12. 'apply_name' =>'varchar',//
  13. 'status' =>'tinyint',//
  14. 'is_del' =>'tinyint',//
  15. 'addtime' =>'datetime',//
  16. 'updatetime' =>'datetime',//
  17. ];
  18. protected $createTime='addtime';
  19. protected $updateTime='updatetime';
  20. public function CatInfo(){
  21. return $this->belongsTo('Cat','cat_id')->bind(['cat_name'=>'cat_name',"cat_search"=>"search"]);
  22. }
  23. }