presseportale/dev/Models/InvoiceBillingAddress.php
Kevin Adametz 405df0a122
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
first commit
2025-10-20 17:53:02 +02:00

88 lines
3 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class InvoiceBillingAddress
*
* @property int $id
* @property int|null $salutation_id
* @property string|null $title
* @property string $name
* @property string|null $address
* @property string|null $address1
* @property string|null $address2
* @property string|null $postal_code
* @property string|null $city
* @property int|null $country_id
* @property string|null $country_name
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Country|null $country
* @property Salutation|null $salutation
* @property Collection|Invoice[] $invoices
* @package App\Models
* @property-read int|null $invoices_count
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress query()
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereAddress($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereAddress1($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereAddress2($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereCity($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereCountryName($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress wherePostalCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereSalutationId($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereUpdatedAt($value)
* @mixin \Eloquent
*/
class InvoiceBillingAddress extends Model
{
protected $table = 'invoice_billing_address';
protected $casts = [
'salutation_id' => 'int',
'country_id' => 'int'
];
protected $fillable = [
'salutation_id',
'title',
'name',
'address',
'address1',
'address2',
'postal_code',
'city',
'country_id',
'country_name'
];
public function country()
{
return $this->belongsTo(Country::class);
}
public function salutation()
{
return $this->belongsTo(Salutation::class);
}
public function invoices()
{
return $this->hasMany(Invoice::class, 'billing_address_id');
}
}