125 lines
No EOL
5.9 KiB
PHP
125 lines
No EOL
5.9 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* App\Models\ShoppingUser
|
|
*
|
|
* @property int $id
|
|
* @property int|null $auth_user_id
|
|
* @property string|null $billing_salutation
|
|
* @property string|null $billing_company
|
|
* @property string|null $billing_firstname
|
|
* @property string|null $billing_lastname
|
|
* @property string|null $billing_address
|
|
* @property string|null $billing_address_2
|
|
* @property string|null $billing_zipcode
|
|
* @property string|null $billing_city
|
|
* @property int $billing_country_id
|
|
* @property string|null $billing_phone
|
|
* @property string|null $billing_email
|
|
* @property int $accepted_data_checkbox
|
|
* @property int $same_as_billing
|
|
* @property string|null $shipping_salutation
|
|
* @property string|null $shipping_company
|
|
* @property string|null $shipping_firstname
|
|
* @property string|null $shipping_lastname
|
|
* @property string|null $shipping_address
|
|
* @property string|null $shipping_address_2
|
|
* @property string|null $shipping_zipcode
|
|
* @property string|null $shipping_city
|
|
* @property int $shipping_country_id
|
|
* @property string|null $shipping_phone
|
|
* @property \Illuminate\Support\Carbon|null $created_at
|
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingOrder[] $Shopping_orders
|
|
* @property-read int|null $shopping_orders_count
|
|
* @property-read \App\Models\Country $billing_country
|
|
* @property-read \App\Models\Country $shipping_country
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereAcceptedDataCheckbox($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereAuthUserId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingAddress($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingAddress2($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingCity($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingCompany($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingCountryId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingEmail($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingFirstname($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingLastname($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingPhone($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingSalutation($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereBillingZipcode($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereSameAsBilling($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingAddress($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingAddress2($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingCity($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingCompany($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingCountryId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingFirstname($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingLastname($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingPhone($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingSalutation($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingZipcode($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class ShoppingUser extends Model
|
|
{
|
|
protected $table = 'shopping_users';
|
|
|
|
protected $fillable = [
|
|
'billing_salutation',
|
|
'billing_company',
|
|
'billing_firstname',
|
|
'billing_lastname',
|
|
'billing_address',
|
|
'billing_address_2',
|
|
'billing_zipcode',
|
|
'billing_city',
|
|
'billing_country_id',
|
|
'billing_phone',
|
|
'billing_email',
|
|
'accepted_data_checkbox',
|
|
'same_as_billing',
|
|
'shipping_salutation',
|
|
'shipping_company',
|
|
'shipping_firstname',
|
|
'shipping_lastname',
|
|
'shipping_address',
|
|
'shipping_address_2',
|
|
'shipping_zipcode',
|
|
'shipping_city',
|
|
'shipping_country_id',
|
|
'shipping_phone',
|
|
];
|
|
|
|
|
|
|
|
public function billing_country()
|
|
{
|
|
return $this->belongsTo('App\Models\Country','billing_country_id');
|
|
}
|
|
|
|
public function shipping_country()
|
|
{
|
|
return $this->belongsTo('App\Models\Country','shipping_country_id');
|
|
}
|
|
|
|
public function shopping_orders()
|
|
{
|
|
return $this->hasMany('App\Models\ShoppingOrder','shopping_user_id');
|
|
}
|
|
|
|
public function shopping_order()
|
|
{
|
|
return $this->hasOne('App\Models\ShoppingOrder','shopping_user_id');
|
|
}
|
|
|
|
} |