| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace app\common\model;
- use think\Model;
- /**
- * 会员模型
- */
- class Income extends Model
- {
- // 表名
- protected $name = 'video_platform';
- // 开启自动写入时间戳字段
- protected $autoWriteTimestamp = 'int';
- // 定义时间戳字段名
- protected $createTime = 'createtime';
- protected $updateTime = 'updatetime';
- // 追加属性
- protected $append = [];
- // 定义关联关系
- // public function videolist()
- // {
- // return $this->belongsTo('Videolist', 'videolist_id', 'id');
- // }
- //
- // public function platform()
- // {
- // return $this->belongsTo('Platform', 'platform_id', 'id');
- // }
- public function videolist()
- {
- return $this->belongsTo('Videolist', 'videolist_id', 'id', [], 'LEFT')->setEagerlyType(0);
- }
- public function platform()
- {
- return $this->belongsTo('Platform', 'platform_id', 'id', [], 'LEFT')->setEagerlyType(0);
- }
- // public function users()
- // {
- // return $this->belongsTo('User', 'uid', 'id', [], 'LEFT')->field('id,avatar,nickname,istel,mobile,isrz,level,group_id')->setEagerlyType(0);
- // }
- }
|