46efd40b9f
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
818 B
PHP
36 lines
818 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
/**
|
|
* Заявка клиента в техподдержку (G7-A). RLS по tenant_id; created_at — DB default.
|
|
*
|
|
* @property int $id
|
|
* @property int $tenant_id
|
|
* @property int $user_id
|
|
* @property string $name
|
|
* @property string $contact
|
|
* @property string $message
|
|
* @property Carbon $created_at
|
|
*/
|
|
class SupportRequest extends Model
|
|
{
|
|
protected $table = 'support_requests';
|
|
|
|
public $timestamps = false; // только created_at (DB DEFAULT now()), updated_at нет
|
|
|
|
protected $fillable = [
|
|
'tenant_id', 'user_id', 'name', 'contact', 'message',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['created_at' => 'datetime'];
|
|
}
|
|
}
|