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
70 lines
2.4 KiB
PHP
70 lines
2.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class BookingInvoice
|
|
*
|
|
* @property int $id
|
|
* @property int $booking_id
|
|
* @property float $total
|
|
* @property float $deposit
|
|
* @property float $final_payment
|
|
* @property Carbon $deposit_payment_date
|
|
* @property Carbon $final_payment_date
|
|
* @property boolean $binary_data
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
* @property Booking $booking
|
|
* @package App\Models
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereBinaryData($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereBookingId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereDeposit($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereDepositPaymentDate($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereFinalPayment($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereFinalPaymentDate($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereTotal($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingInvoice whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class BookingInvoice extends Model
|
|
{
|
|
protected $table = 'booking_invoice';
|
|
|
|
protected $casts = [
|
|
'booking_id' => 'int',
|
|
'total' => 'float',
|
|
'deposit' => 'float',
|
|
'final_payment' => 'float',
|
|
'deposit_payment_date' => 'datetime',
|
|
'final_payment_date' => 'datetime',
|
|
];
|
|
|
|
|
|
protected $fillable = [
|
|
'booking_id',
|
|
'total',
|
|
'deposit',
|
|
'final_payment',
|
|
'deposit_payment_date',
|
|
'final_payment_date',
|
|
'binary_data'
|
|
];
|
|
|
|
public function booking()
|
|
{
|
|
return $this->belongsTo(Booking::class);
|
|
}
|
|
}
|