<?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');
    }
}
