promotion 1.0
This commit is contained in:
parent
1cc8e025a1
commit
570d428b1c
60 changed files with 1596 additions and 272 deletions
|
|
@ -99,6 +99,11 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereShippedAt($value)
|
||||
* @property string|null $invoice_number
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereInvoiceNumber($value)
|
||||
* @property int|null $promotion_user_id
|
||||
* @property string|null $shipping_option
|
||||
* @property-read \App\Models\PromotionUser|null $promotion_user
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder wherePromotionUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereShippingOption($value)
|
||||
*/
|
||||
class ShoppingOrder extends Model
|
||||
{
|
||||
|
|
@ -110,7 +115,9 @@ class ShoppingOrder extends Model
|
|||
protected $fillable = [
|
||||
'shopping_user_id',
|
||||
'auth_user_id',
|
||||
'promotion_user_id',
|
||||
'member_id',
|
||||
'payment_for',
|
||||
'country_id',
|
||||
'user_shop_id',
|
||||
'total',
|
||||
|
|
@ -135,6 +142,7 @@ class ShoppingOrder extends Model
|
|||
'mode',
|
||||
'shipped',
|
||||
'shipped_at',
|
||||
'shipping_option',
|
||||
'tracking'
|
||||
];
|
||||
|
||||
|
|
@ -152,6 +160,15 @@ class ShoppingOrder extends Model
|
|||
10 => 'storniert'
|
||||
];
|
||||
|
||||
public static $paymentForTypes = [
|
||||
0 => '',
|
||||
1 => 'wizzard',
|
||||
2 => 'user_order me',
|
||||
3 => 'user_order ot',
|
||||
4 => 'Promotion',
|
||||
10 => ''
|
||||
];
|
||||
|
||||
public static $apiShippedTypes = [
|
||||
0 => 'open', //(Fullfilment durch Händler)',
|
||||
1 => 'process', //(Fullfilment durch MIVITA: nicht Versand)
|
||||
|
|
@ -183,6 +200,11 @@ class ShoppingOrder extends Model
|
|||
return $this->belongsTo('App\Models\ShippingCountry','country_id');
|
||||
}
|
||||
|
||||
public function promotion_user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\PromotionUser','promotion_user_id');
|
||||
}
|
||||
|
||||
//can null
|
||||
public function member()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue