69 lines
2.2 KiB
PHP
69 lines
2.2 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class IQContentTag
|
|
*
|
|
* @property int $id
|
|
* @property int $category_id
|
|
* @property string $name
|
|
* @property string $slug
|
|
* @property int $pos
|
|
* @property bool $active
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
* @property IQContentCategory $i_q_content_category
|
|
* // * @property Collection|IQContentFileTag[] $i_q_content_file_tags
|
|
* @package App\Models
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag whereActive($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag whereCategoryId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag whereName($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag wherePos($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag whereSlug($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTag whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class IQContentTag extends Model
|
|
{
|
|
protected $connection = 'mysql_stern';
|
|
|
|
protected $table = 'i_q_content_tags';
|
|
|
|
protected $casts = [
|
|
'category_id' => 'int',
|
|
'pos' => 'int',
|
|
'active' => 'bool'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'category_id',
|
|
'name',
|
|
'slug',
|
|
'pos',
|
|
'active'
|
|
];
|
|
|
|
public function i_q_content_category()
|
|
{
|
|
return $this->belongsTo(IQContentCategory::class, 'category_id');
|
|
}
|
|
|
|
/*public function i_q_content_file_tags()
|
|
{
|
|
return $this->hasMany(IQContentFileTag::class, 'tag_id');
|
|
}*/
|
|
}
|