mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 20:43:56 +00:00
28 lines
546 B
PHP
28 lines
546 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Reward extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'rewards';
|
|
protected $dates = ['deleted_at'];
|
|
|
|
public function milestones()
|
|
{
|
|
return $this->belongsToMany(Milestone::class, MilestoneReward::class);
|
|
}
|
|
|
|
/**
|
|
* @return HasMany
|
|
*/
|
|
public function users(): HasMany
|
|
{
|
|
return $this->HasMany(UserReward::class, 'reward_id', 'id');
|
|
}
|
|
}
|