<?php

class ShoplogisticsOrder extends \Eloquent {

	use SoftDeletingTrait;

	protected $guarded		 = array();
	public static $rules	 = array();

	public function partner() {
		return $this->belongsTo('Partner');
	}

	public function user() {
		return $this->belongsTo('User')->withTrashed()->remember(60);
	}

	public function setDeliveryHistoryAttribute($value) {
		$this->attributes['delivery_history']	 = serialize($value);
	}

	public function getDeliveryHistoryAttribute() {
		return unserialize($this->attributes['delivery_history']);
	}

}
