PATH:
home
/
lab2454c
/
vaultchip.com
/
platform
/
plugins
/
ecommerce
/
src
/
Models
<?php namespace Botble\Ecommerce\Models; use Botble\Base\Models\BaseModel; use Botble\Base\Traits\EnumCastable; use Botble\Ecommerce\Enums\ShippingCodStatusEnum; use Botble\Ecommerce\Enums\ShippingStatusEnum; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; class Shipment extends BaseModel { use EnumCastable; /** * @var string */ protected $table = 'ec_shipments'; /** * @var array */ protected $fillable = [ 'order_id', 'user_id', 'weight', 'shipment_id', 'note', 'status', 'cod_amount', 'cod_status', 'cross_checking_status', 'price', 'store_id', ]; /** * @var array */ protected $dates = [ 'created_at', 'updated_at', ]; /** * @var array */ protected $casts = [ 'status' => ShippingStatusEnum::class, 'cod_status' => ShippingCodStatusEnum::class, ]; protected static function boot() { parent::boot(); self::deleting(function (Shipment $shipment) { ShipmentHistory::where('shipment_id', $shipment->id)->delete(); }); } /** * @return HasOne */ public function store() { return $this->hasOne(StoreLocator::class, 'id', 'store_id')->withDefault(); } /** * @return HasMany */ public function histories() { return $this->hasMany(ShipmentHistory::class, 'shipment_id'); } /** * @return BelongsTo */ public function order() { return $this->belongsTo(Order::class)->withDefault(); } }
[-] ProductLabelTranslation.php
[edit]
[-] Review.php
[edit]
[-] ShippingRule.php
[edit]
[+]
..
[-] Discount.php
[edit]
[-] Address.php
[edit]
[-] GroupedProduct.php
[edit]
[-] StoreLocator.php
[edit]
[-] ProductAttribute.php
[edit]
[-] OrderHistory.php
[edit]
[-] ShipmentHistory.php
[edit]
[-] ProductVariation.php
[edit]
[-] DiscountProductCollection.php
[edit]
[-] ProductAttributeTranslation.php
[edit]
[-] ProductCollection.php
[edit]
[-] Order.php
[edit]
[-] Wishlist.php
[edit]
[-] ProductTag.php
[edit]
[-] Customer.php
[edit]
[-] BrandTranslation.php
[edit]
[-] Tax.php
[edit]
[-] FlashSale.php
[edit]
[-] ProductAttributeSetTranslation.php
[edit]
[-] ProductCollectionTranslation.php
[edit]
[-] OrderAddress.php
[edit]
[-] DiscountProduct.php
[edit]
[-] DiscountCustomer.php
[edit]
[-] Shipping.php
[edit]
[-] Brand.php
[edit]
[-] ProductTranslation.php
[edit]
[-] ProductVariationItem.php
[edit]
[-] Product.php
[edit]
[-] ProductLabel.php
[edit]
[-] OrderProduct.php
[edit]
[-] Currency.php
[edit]
[-] ShippingRuleItem.php
[edit]
[-] ProductAttributeSet.php
[edit]
[-] FlashSaleTranslation.php
[edit]
[-] ProductCategory.php
[edit]
[-] Shipment.php
[edit]
[-] ProductCategoryTranslation.php
[edit]