You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
794 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class CrawlAddress extends Model
{
protected $fillable = [
'target_type',
'name',
'request_url',
'keyword',
'category_dict_item_id',
'university_id',
'sort',
'status',
];
protected $casts = [
'category_dict_item_id' => 'integer',
'university_id' => 'integer',
'sort' => 'integer',
'status' => 'integer',
];
public function categoryDictItem(): BelongsTo
{
return $this->belongsTo(DictItem::class, 'category_dict_item_id');
}
public function university(): BelongsTo
{
return $this->belongsTo(University::class);
}
}