Enth\u00e4lt gemischt: Laravel-10-Upgrade + Phase 1 (Contacts-Modul, Duplicats-Commands, Soft-Delete+Merge-Fields) + Phase 2 Code-Umstellungen (inquiry_id, $table='contacts'/'inquiries') + Offers-Modul (Migrationen, Models, offer_id in Booking, offer-Disk in filesystems.php). Phase 2 + Offers werden im folgenden Commit nach dev/backups/phase2-offers-2026-04-17/ verschoben, damit der Workspace auf Phase-1-only (= Test-System-Stand) reduziert ist und direkt auf Live deploybar wird. Tarball-Backup zus\u00e4tzlich unter: ../backups-safety/workspace-pre-phase1-rollback-2026-04-17.tar.gz Made-with: Cursor
88 lines
2.5 KiB
PHP
88 lines
2.5 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class Inquiry
|
|
*
|
|
* @property int $id
|
|
* @property int $lead_id
|
|
* @property int $template_id
|
|
* @property bool $in_pdf
|
|
* @property Carbon $begin
|
|
* @property Carbon $end
|
|
* @property int $type_id
|
|
* @property string $type_s
|
|
* @property string $data_s
|
|
* @property int $view_position
|
|
* @property Lead $lead
|
|
* @property InquiryTemplate $inquiry_template
|
|
* @property InquiryType $inquiry_type
|
|
* @package App\Models
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereBegin($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereDataS($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereEnd($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereInPdf($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereLeadId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereTemplateId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereTypeId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereTypeS($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Inquiry whereViewPosition($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Inquiry extends Model
|
|
{
|
|
protected $connection = 'mysql';
|
|
|
|
protected $table = 'inquiry';
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'lead_id' => 'int',
|
|
'template_id' => 'int',
|
|
'in_pdf' => 'bool',
|
|
'type_id' => 'int',
|
|
'view_position' => 'int',
|
|
'begin' => 'datetime',
|
|
'end' => 'datetime',
|
|
];
|
|
|
|
|
|
protected $fillable = [
|
|
'lead_id',
|
|
'template_id',
|
|
'in_pdf',
|
|
'begin',
|
|
'end',
|
|
'type_id',
|
|
'type_s',
|
|
'data_s',
|
|
'view_position'
|
|
];
|
|
|
|
public function lead()
|
|
{
|
|
return $this->belongsTo(Lead::class);
|
|
}
|
|
|
|
public function inquiry_template()
|
|
{
|
|
return $this->belongsTo(InquiryTemplate::class, 'template_id');
|
|
}
|
|
|
|
public function inquiry_type()
|
|
{
|
|
return $this->belongsTo(InquiryType::class, 'type_id');
|
|
}
|
|
}
|