You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
559 B
32 lines
559 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Contracts\Model;
|
|
|
|
class UserAward extends Model
|
|
{
|
|
public $table = 'user_awards';
|
|
|
|
protected $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');
|
|
}
|
|
}
|