initial commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Concerns\BelongsToOrganization;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
#[Fillable(['establishment_id', 'stat_date', 'total_washes', 'total_revenue', 'bookings_count', 'no_show_count', 'top_up_amount', 'occupancy_rate'])]
|
||||
class DailyEstablishmentStat extends Model
|
||||
{
|
||||
use BelongsToOrganization;
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'stat_date' => 'date',
|
||||
'total_washes' => 'integer',
|
||||
'total_revenue' => 'decimal:2',
|
||||
'bookings_count' => 'integer',
|
||||
'no_show_count' => 'integer',
|
||||
'top_up_amount' => 'decimal:2',
|
||||
'occupancy_rate' => 'decimal:2',
|
||||
];
|
||||
}
|
||||
|
||||
public function establishment(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Establishment::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user