32 lines
560 B
PHP
Executable File
32 lines
560 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Dcat\Admin\Traits\HasDateTimeFormatter;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class UserCoinClue extends Model
|
|
{
|
|
use HasDateTimeFormatter;
|
|
|
|
protected $table = 'user_coin_clue';
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'coin_id',
|
|
'coin_clue_id',
|
|
'amount',
|
|
];
|
|
|
|
public function coin()
|
|
{
|
|
return $this->belongsTo(Coin::class, 'coin_id', 'id');
|
|
}
|
|
|
|
public function coinClue()
|
|
{
|
|
return $this->belongsTo(CoinClue::class, 'coin_clue_id', 'id');
|
|
}
|
|
}
|