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
81 lines
2.3 KiB
PHP
81 lines
2.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class StatusHistory
|
|
*
|
|
* @property int $id
|
|
* @property int $status_id
|
|
* @property int $lead_id
|
|
* @property int $sf_guard_user_id
|
|
* @property Carbon $date
|
|
* @property string $remarks
|
|
* @property Carbon $target_date
|
|
* @property Carbon $created_at
|
|
* @property Lead $lead
|
|
* @property SfGuardUser $sf_guard_user
|
|
* @property Status $status
|
|
* @package App\Models
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereDate($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereLeadId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereRemarks($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereSfGuardUserId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereStatusId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\StatusHistory whereTargetDate($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class StatusHistory extends Model
|
|
{
|
|
protected $connection = 'mysql';
|
|
|
|
protected $table = 'status_history';
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'status_id' => 'int',
|
|
'lead_id' => 'int',
|
|
'sf_guard_user_id' => 'int',
|
|
'date' => 'datetime',
|
|
'target_date' => 'datetime',
|
|
'created_at' => 'datetime',
|
|
];
|
|
|
|
|
|
protected $fillable = [
|
|
'status_id',
|
|
'lead_id',
|
|
'sf_guard_user_id',
|
|
'date',
|
|
'remarks',
|
|
'target_date',
|
|
'created_at'
|
|
];
|
|
|
|
public function lead()
|
|
{
|
|
return $this->belongsTo(Lead::class);
|
|
}
|
|
|
|
public function sf_guard_user()
|
|
{
|
|
return $this->belongsTo(SfGuardUser::class);
|
|
}
|
|
|
|
public function status()
|
|
{
|
|
return $this->belongsTo(Status::class);
|
|
}
|
|
}
|