restore composer.json, add mysqli extension

This commit is contained in:
2026-04-15 17:02:52 +05:00
commit 77cf56a348
4317 changed files with 1397107 additions and 0 deletions

59
app/Models/PartnerRequest.php Executable file
View File

@@ -0,0 +1,59 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @package App\Models
* @property int $id
* @property int $partner_id
* @property int $city_id
* @property int $user_id
* @property $price
* @property string|null $comment
* @property int $phone
* @property string $status // pending, accepted, closed, rejected
* @property string $full_name
*
* @property Partner $partner
* @property City $city
* @property Status $getStatus
*/
class PartnerRequest extends Model
{
use HasFactory;
protected $fillable = [
'partner_id',
'city_id',
'user_id',
'price',
'comment',
'phone',
'full_name',
'status'
];
public function getStatus(): BelongsTo
{
return $this->belongsTo(Status::class, 'status', 'slug');
}
public function partner(): BelongsTo
{
return $this->belongsTo(Partner::class);
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function city(): BelongsTo
{
return $this->belongsTo(City::class);
}
}