54 lines
No EOL
1.2 KiB
PHP
54 lines
No EOL
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
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');
|
|
}
|
|
|
|
} |