83 lines
1.6 KiB
PHP
83 lines
1.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class AiTool
|
|
*
|
|
* @property int $id
|
|
* @property int $category_id
|
|
* @property int $url_to_crawl_id
|
|
* @property string|null $screenshot_img
|
|
* @property bool $is_ai_tool
|
|
* @property string $tool_name
|
|
* @property string $is_app_web_both
|
|
* @property string|null $tagline
|
|
* @property string|null $summary
|
|
* @property string $pricing_type
|
|
* @property string|null $keyword_string
|
|
* @property string|null $qna
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
*
|
|
* @property Category $category
|
|
* @property UrlToCrawl $url_to_crawl
|
|
* @property Collection|SearchEmbedding[] $search_embeddings
|
|
* @property Collection|AiToolKeyword[] $ai_tool_keywords
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class AiTool extends Model
|
|
{
|
|
protected $table = 'ai_tools';
|
|
|
|
protected $casts = [
|
|
'category_id' => 'int',
|
|
'url_to_crawl_id' => 'int',
|
|
'is_ai_tool' => 'bool',
|
|
'qna' => 'object'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'category_id',
|
|
'url_to_crawl_id',
|
|
'screenshot_img',
|
|
'is_ai_tool',
|
|
'tool_name',
|
|
'is_app_web_both',
|
|
'tagline',
|
|
'summary',
|
|
'pricing_type',
|
|
'keyword_string',
|
|
'qna'
|
|
];
|
|
|
|
public function category()
|
|
{
|
|
return $this->belongsTo(Category::class);
|
|
}
|
|
|
|
public function url_to_crawl()
|
|
{
|
|
return $this->belongsTo(UrlToCrawl::class);
|
|
}
|
|
|
|
public function search_embeddings()
|
|
{
|
|
return $this->hasMany(SearchEmbedding::class);
|
|
}
|
|
|
|
public function ai_tool_keywords()
|
|
{
|
|
return $this->hasMany(AiToolKeyword::class);
|
|
}
|
|
}
|