dealhub/app/Models/Interaction.php
kusowl 38d429e5d5 bugfix: improvemnets in UI, misc bugfixes
add tooltip to sidebar buttons
remove profile for admin
fix mobile menu not opening in home page
fix deal image input modal size in mobile view
make image scrollable in input modal
fix explore page filters are not clickable when recent search is maxed
out
change UI for the recent searches
add seeder for categories
improve deal card ui in broker dashboard
2026-01-29 14:02:39 +05:30

57 lines
1.8 KiB
PHP

<?php
namespace App\Models;
use App\Enums\InteractionType;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @property int $id
* @property int $user_id
* @property int $deal_id
* @property InteractionType $type
* @property int $count
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Models\Deal|null $deal
* @property-read \App\Models\Deal|null $user
*
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereCount($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereDealId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereUserId($value)
*
* @mixin \Eloquent
*/
class Interaction extends Model
{
protected $fillable = [
'type',
'user_id',
];
public function user(): BelongsTo
{
return $this->belongsTo(Deal::class);
}
public function deal(): BelongsTo
{
return $this->belongsTo(Deal::class);
}
protected function casts(): array
{
return [
'type' => InteractionType::class,
];
}
}