initial commit

This commit is contained in:
bastien
2026-06-28 12:29:53 +02:00
parent 03e85d2f9d
commit b2443b654c
220 changed files with 24969 additions and 1 deletions
+38
View File
@@ -0,0 +1,38 @@
<?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', 'machine_id', 'machine_type', 'day_type', 'slot_start', 'slot_end', 'price', 'label', 'requires_app', 'priority', 'is_active'])]
class PricingRule extends Model
{
use BelongsToOrganization;
protected function casts(): array
{
return [
'machine_type' => 'string',
'day_type' => 'string',
'slot_start' => 'datetime:H:i:s',
'slot_end' => 'datetime:H:i:s',
'price' => 'decimal:2',
'requires_app' => 'boolean',
'priority' => 'integer',
'is_active' => 'boolean',
];
}
public function establishment(): BelongsTo
{
return $this->belongsTo(Establishment::class);
}
public function machine(): BelongsTo
{
return $this->belongsTo(Machine::class);
}
}