|
@@ -10,4 +10,10 @@ class UserInfo extends Model
|
|
|
use HasFactory;
|
|
use HasFactory;
|
|
|
protected $primaryKey = 'id';
|
|
protected $primaryKey = 'id';
|
|
|
public $incrementing = true;
|
|
public $incrementing = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 可选:定义反向关联
|
|
|
|
|
+ public function channels()
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->hasMany(Channel::class, 'owner_id', 'userid');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|