Prepare modules

This commit is contained in:
2025-03-22 12:41:56 -06:00
parent 04f5e973d7
commit 3916c62935
74 changed files with 4431 additions and 194 deletions

33
Models/Faq.php Normal file
View File

@ -0,0 +1,33 @@
<?php
namespace Koneko\VuexyWebsiteAdmin\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Faq extends Model
{
use HasFactory;
protected $fillable = [
'category_id',
'question',
'answer',
'order',
'is_active',
];
protected $casts = [
'order' => 'integer',
'is_active' => 'boolean',
];
/**
* Categoría a la que pertenece esta FAQ.
*/
public function category(): BelongsTo
{
return $this->belongsTo(FaqCategory::class, 'category_id');
}
}

32
Models/FaqCategory.php Normal file
View File

@ -0,0 +1,32 @@
<?php
namespace Koneko\VuexyWebsiteAdmin\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class FaqCategory extends Model
{
use HasFactory;
protected $fillable = [
'name',
'icon',
'order',
'is_active',
];
protected $casts = [
'order' => 'integer',
'is_active' => 'boolean',
];
/**
* FAQs asociadas a esta categoría.
*/
public function faqs(): HasMany
{
return $this->hasMany(Faq::class, 'category_id');
}
}

View File

19
Models/SitemapUrl.php Normal file
View File

@ -0,0 +1,19 @@
<?php
namespace Koneko\VuexyWebsiteAdmin\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SitemapUrl extends Model
{
use HasFactory;
protected $fillable = [
'url',
'changefreq',
'priority',
'lastmod',
'is_active',
];
}