12345678910111213141516171819202122232425262728 |
- <?php
- namespace app\admin\model;
- class Platform extends Base
- {
- protected $schema = [
- 'id' =>'int',
- 'platform_code' =>'varchar',
- 'platform_name' =>'varchar',
- 'platform_type' =>'tinyint',
- 'is_select_pay_rate' =>'tinyint',
- 'pay_title' =>'varchar',
- 'use_type' =>'tinyint',
- 'desc' =>'double',
- 'createrid' =>'int',
- 'creater' =>'varchar',
- 'status' =>'tinyint',
- 'is_del' =>'tinyint',
- 'addtime' =>'datetime',
- 'updatetime' =>'datetime',
- ];
- protected $createTime='addtime';
- protected $updateTime='updatetime';
- public function platChannel(){
- return $this->hasMany(PlatformChannel::class,'platform_id','id')->where(["is_del"=>0])->order(['weight' => 'desc'])->bind(['channel_name','companyName','companyNo']);
- }
- }
|