12345678910111213141516171819202122232425262728293031 |
- <?php
- declare(strict_types=1);
- namespace App\Model;
- use Hyperf\DbConnection\Model\Model;
- /**
- */
- class WebsiteCategory extends Model
- {
- /**
- * The table associated with the model.
- */
- protected ?string $table = 'website_category';
- /**
- * The attributes that are mass assignable.
- */
- protected array $fillable = ['website_id', 'name', 'sort', 'pid', 'seo_title', 'seo_keywords', 'seo_description', 'pid_arr', 'alias', 'aLIas_pinyin', 'category_arr_id', 'category_id', 'is_url', 'web_url'];
- /**
- * The attributes that should be cast to native types.
- */
- protected array $casts = [];
- public function children()
- {
- return $this->hasMany(WebsiteCategory::class, 'pid', 'category_id');
- }
- }
|