| 12345678910111213141516171819202122 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class LiveRome extends Model
- {
- protected $table = 'love_live_rome';
- protected $fillable = [
- 'uid', 'jid','name', 'file','description','type','size','sort','status'
- ];
- public function gifts(){
- return $this->hasMany(LiveRomeGift::class,'lid','id');
- }
- public function guest(){
- return $this->hasOne(Users::class,'id','jid')->select('id','name', 'lid', 'avatar','sex','age','vip','trump','opt','city');
- }
- public function user(){
- return $this->hasOne(Users::class,'id','uid')->select('id','name', 'lid', 'avatar','sex','age','vip','trump','opt','city');
- }
- }
|