setTable(config('ibrand.app.database.prefix', 'ibrand_') . 'order_adjustment'); parent::__construct($attributes); } /** * create a adjustment. * * @param $type * @param $label * @param $amount * @param $originId * @param $originType * * @return mixed */ public function createNew($type, $label, $amount, $originId, $originType) { return new self(['type'=>$type,'label'=>$label,'amount'=>$amount,'origin_id'=>$originId,'origin_type'=>$originType]); } }