44 lines
1.0 KiB
PHP
Executable File
44 lines
1.0 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
//use Illuminate\Database\Eloquent\Relations\MorphTo;
|
|
//use Illuminate\Database\Eloquent\Relations\MorphMany;
|
|
|
|
class ArticleKeyAuthorMap extends Model
|
|
{
|
|
protected $table = 'article_key_author_map';
|
|
public $timestamps = false;
|
|
|
|
// protected $guarded = [];
|
|
|
|
// protected function casts(): array
|
|
// {
|
|
// return [
|
|
// 'aOpt' => 'array',
|
|
// 'aSchemaPro' => 'array',
|
|
// ];
|
|
// }// 我希望查询的时候忽略这个设置
|
|
|
|
// protected static function booted(): void
|
|
// {
|
|
// static::deleting(function ($oArticle) {
|
|
// $oArticle->oImages()->get()->each(function ($oImage) {
|
|
// $oImage->delete();
|
|
// });
|
|
// });
|
|
// }
|
|
//
|
|
// public function oSubject(): MorphTo
|
|
// {
|
|
// return $this->morphTo('oSubject');
|
|
// }
|
|
//
|
|
// public function oImages(): MorphMany
|
|
// {
|
|
// return $this->morphMany(UploadImages::class, 'oImageable');
|
|
// }
|
|
|
|
}
|