BrokerPushLevelRecordItem.php 778 Bytes
<?php

namespace App\Models;

use App\Support\Model;
use Awobaz\Compoships\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class BrokerPushLevelRecordItem extends Model
{
    use SoftDeletes;

    protected $table = 'broker_push_level_record_items';

    protected $guarded = [];

    protected $hidden = ['deleted_at'];

    /**
     * @return \Awobaz\Compoships\Database\Eloquent\Relations\BelongsTo
     */
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class)->withTrashed();
    }

    /**
     * @return \Awobaz\Compoships\Database\Eloquent\Relations\BelongsTo
     */
    public function record(): BelongsTo
    {
        return $this->belongsTo(BrokerPushLevelRecord::class, 'record_id');
    }
}