first commit

This commit is contained in:
furen81
2026-01-23 19:18:52 +07:00
commit 6e681c4ad3
80 changed files with 13874 additions and 0 deletions

38
app/Models/Waypoint.php Normal file
View File

@ -0,0 +1,38 @@
<?php
namespace App\Models;
use MongoDB\Laravel\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Waypoint extends Model
{
protected $fillable = [
'sales_route_id',
'type',
'latitude',
'longitude',
'recorded_at',
'location_name',
'address',
'notes',
'photo_url',
];
protected function casts(): array
{
return [
'latitude' => 'decimal:8',
'longitude' => 'decimal:8',
'recorded_at' => 'datetime',
];
}
/**
* Get the sales route that owns the waypoint.
*/
public function salesRoute(): BelongsTo
{
return $this->belongsTo(SalesRoute::class);
}
}