promotion 1.0
This commit is contained in:
parent
1cc8e025a1
commit
570d428b1c
60 changed files with 1596 additions and 272 deletions
126
app/Models/PromotionUserOrder.php
Normal file
126
app/Models/PromotionUserOrder.php
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PromotionUserOrder
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $promotion_admin_id
|
||||
* @property int $promotion_user_id
|
||||
* @property int $promotion_user_product_id
|
||||
* @property int $product_id
|
||||
* @property int $shopping_order_item_id
|
||||
* @property int $shopping_order_id
|
||||
* @property int $shopping_user_id
|
||||
* @property int|null $qty
|
||||
* @property float|null $price
|
||||
* @property float|null $price_net
|
||||
* @property float|null $tax_rate
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Product $product
|
||||
* @property PromotionAdmin $promotion_admin
|
||||
* @property PromotionUser $promotion_user
|
||||
* @property PromotionUserProduct $promotion_user_product
|
||||
* @property ShoppingOrder $shopping_order
|
||||
* @property ShoppingOrderItem $shopping_order_item
|
||||
* @property ShoppingUser $shopping_user
|
||||
* @package App\Models
|
||||
* @property int|null $status
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder wherePriceNet($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereProductId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder wherePromotionAdminId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder wherePromotionUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder wherePromotionUserProductId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereQty($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereShoppingOrderId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereShoppingOrderItemId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereShoppingUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereTaxRate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionUserOrder whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PromotionUserOrder extends Model
|
||||
{
|
||||
protected $table = 'promotion_user_orders';
|
||||
|
||||
protected $casts = [
|
||||
'promotion_admin_id' => 'int',
|
||||
'promotion_user_id' => 'int',
|
||||
'promotion_user_product_id' => 'int',
|
||||
'product_id' => 'int',
|
||||
'shopping_order_item_id' => 'int',
|
||||
'shopping_order_id' => 'int',
|
||||
'shopping_user_id' => 'int',
|
||||
'qty' => 'int',
|
||||
'price' => 'float',
|
||||
'price_net' => 'float',
|
||||
'tax_rate' => 'float',
|
||||
'status' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'promotion_admin_id',
|
||||
'promotion_user_id',
|
||||
'promotion_user_product_id',
|
||||
'product_id',
|
||||
'shopping_order_item_id',
|
||||
'shopping_order_id',
|
||||
'shopping_user_id',
|
||||
'qty',
|
||||
'price',
|
||||
'price_net',
|
||||
'tax_rate',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function product()
|
||||
{
|
||||
return $this->belongsTo(Product::class);
|
||||
}
|
||||
|
||||
public function promotion_admin()
|
||||
{
|
||||
return $this->belongsTo(PromotionAdmin::class);
|
||||
}
|
||||
|
||||
public function promotion_user()
|
||||
{
|
||||
return $this->belongsTo(PromotionUser::class);
|
||||
}
|
||||
|
||||
public function promotion_user_product()
|
||||
{
|
||||
return $this->belongsTo(PromotionUserProduct::class);
|
||||
}
|
||||
|
||||
public function shopping_order()
|
||||
{
|
||||
return $this->belongsTo(ShoppingOrder::class);
|
||||
}
|
||||
|
||||
public function shopping_order_item()
|
||||
{
|
||||
return $this->belongsTo(ShoppingOrderItem::class);
|
||||
}
|
||||
|
||||
public function shopping_user()
|
||||
{
|
||||
return $this->belongsTo(ShoppingUser::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue