31 lines
551 B
PHP
31 lines
551 B
PHP
<?php
|
|
|
|
namespace BYDAuto\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Activity.
|
|
*
|
|
* @property int id
|
|
* @property string name
|
|
* @property array content
|
|
* @property int related_id
|
|
* @property string related_type
|
|
*/
|
|
class Activity extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected $table = 'bydauto_activity';
|
|
|
|
protected $fillable = ['name', 'content', 'related_id', 'related_type'];
|
|
|
|
protected $casts = ['content' => 'json'];
|
|
|
|
public function related()
|
|
{
|
|
return $this->morphTo('related');
|
|
}
|
|
}
|