web-api/packages/bydauto/src/Models/Activity.php
珂珂 c003c3f4b8
All checks were successful
Deploy to Production / deploy (push) Successful in 21s
dev
2024-11-22 15:21:11 +08:00

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');
}
}