Website.php 599 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Model;
  4. use Hyperf\DbConnection\Model\Model;
  5. use App\Model\WebsiteCategory;
  6. /**
  7. */
  8. class Website extends Model
  9. {
  10. /**
  11. * The table associated with the model.
  12. */
  13. protected ?string $table = 'website';
  14. /**
  15. * The attributes that are mass assignable.
  16. */
  17. protected array $fillable = [];
  18. /**
  19. * The attributes that should be cast to native types.
  20. */
  21. protected array $casts = [];
  22. public function websiteCategory()
  23. {
  24. return $this->hasMany(WebsiteCategory::class,'website_id','id');
  25. }
  26. }