mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 03:51:10 -05:00
refactor: remove Company model as it is no longer needed
This commit is contained in:
@@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
use App\Traits\TrackedModel;
|
|
||||||
|
|
||||||
class Company extends Model
|
|
||||||
{
|
|
||||||
use HasFactory, TrackedModel;
|
|
||||||
|
|
||||||
protected $fillable = [
|
|
||||||
'name',
|
|
||||||
'slug',
|
|
||||||
'description',
|
|
||||||
'website',
|
|
||||||
'founded_year',
|
|
||||||
'headquarters',
|
|
||||||
'status'
|
|
||||||
];
|
|
||||||
|
|
||||||
public function parks()
|
|
||||||
{
|
|
||||||
return $this->hasMany(Park::class, 'owner_id');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function updateStatistics()
|
|
||||||
{
|
|
||||||
// Implementation matching Django's Company.update_statistics()
|
|
||||||
$this->loadCount('parks');
|
|
||||||
$this->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user