phpvms/app/Models/UserAward.php

36 lines
606 B
PHP
Raw Normal View History

2018-03-17 12:59:53 +08:00
<?php
namespace App\Models;
use App\Interfaces\Model;
2018-03-17 12:59:53 +08:00
/**
* Class UserAward
* @package App\Models
*/
class UserAward extends Model
2018-03-17 12:59:53 +08:00
{
public $table = 'user_awards';
public $fillable = [
'user_id',
'award_id'
];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function award()
{
return $this->belongsTo(Award::class, 'award_id');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
2018-03-17 12:59:53 +08:00
}