mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 20:44:19 +00:00
39 lines
742 B
PHP
39 lines
742 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* Class Segment
|
|
* @package App\Models
|
|
*
|
|
* @property string name
|
|
* @property string reference
|
|
*/
|
|
class ConnectionSegment extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'connection_segments';
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
/**
|
|
* @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');
|
|
}
|
|
}
|