mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-21 13:34:00 +00:00
44 lines
833 B
PHP
44 lines
833 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* Class ConnectionSegment
|
|
* @package App\Models
|
|
*
|
|
* @property string $name
|
|
* @property string $reference
|
|
*/
|
|
class ConnectionSegment extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'connection_segments';
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'deleted_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return HasMany
|
|
*/
|
|
public function segments(): HasMany
|
|
{
|
|
return $this->HasMany(Segment::class, 'segment_id', 'id');
|
|
}
|
|
|
|
/**
|
|
* @return HasMany
|
|
*/
|
|
public function companyConnections(): HasMany
|
|
{
|
|
return $this->HasMany(CompanyConnection::class, 'company_connection_id', 'id');
|
|
}
|
|
}
|