Add helpdesk import progress, category model, article metadata columns, and ticket pagination controls
This commit is contained in:
@@ -4,11 +4,21 @@ namespace App\Models;
|
||||
|
||||
use App\Casts\VectorCast;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Article extends Model
|
||||
{
|
||||
protected $fillable = ['title', 'content', 'embedding'];
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'content',
|
||||
'embedding',
|
||||
'source',
|
||||
'source_url',
|
||||
'source_article_id',
|
||||
'category_id',
|
||||
'subcategory_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'embedding' => VectorCast::class,
|
||||
@@ -18,4 +28,14 @@ class Article extends Model
|
||||
{
|
||||
return $this->hasMany(AIDecision::class);
|
||||
}
|
||||
|
||||
public function category(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Category::class, 'category_id');
|
||||
}
|
||||
|
||||
public function subcategory(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Category::class, 'subcategory_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user