Files
core/src/Shipping/Models/Manifest.php
T

29 lines
816 B
PHP
Raw Normal View History

<?php
namespace Modules\Core\Shipping\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* A carrier pickup-list/manifest as WE recorded it at the moment it was
* issued (Modules\Core\Shipping\Contracts\SupportsManifestBatching::
* issueManifest()) — the carrier's own API (ACS's ACS_Issue_Pickup_List
* included) typically returns nothing beyond a reference number, so this
* table is the only place "which shipments were on manifest X, and when"
* is ever recorded; it cannot be re-derived from the carrier later.
*/
class Manifest extends Model
{
protected $guarded = [];
protected $casts = [
'issued_at' => 'datetime',
];
public function shipments(): HasMany
{
return $this->hasMany(Shipment::class);
}
}