2020-12-05 07:08:05 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class AccountInterstitial extends Model
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The attributes that should be mutated to dates.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2023-04-20 04:30:37 +00:00
|
|
|
protected $casts = [
|
|
|
|
'read_at' => 'datetime',
|
|
|
|
'appeal_requested_at' => 'datetime'
|
|
|
|
];
|
2020-12-05 07:08:05 +00:00
|
|
|
|
|
|
|
public const JSON_MESSAGE = 'Please use web browser to proceed.';
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(User::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function status()
|
|
|
|
{
|
|
|
|
if($this->item_type != 'App\Status') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return $this->hasOne(Status::class, 'id', 'item_id');
|
|
|
|
}
|
|
|
|
}
|