|
|
@@ -19,23 +19,23 @@ class Income extends Model
|
|
|
// 追加属性
|
|
|
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);
|
|
|
+// return $this->belongsTo('Videolist', 'videolist_id', 'id');
|
|
|
// }
|
|
|
+//
|
|
|
// public function platform()
|
|
|
// {
|
|
|
-// return $this->belongsTo('Platform', 'platform_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
|
+// 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);
|