35 lines
664 B
PHP
35 lines
664 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
*
|
|
*
|
|
*
|
|
* Date: 2021/5/26
|
|
* Time: 10:54
|
|
*/
|
|
|
|
namespace app\frontend\modules\cart\extra\models;
|
|
|
|
|
|
use app\frontend\modules\cart\models\CartBaseModel;
|
|
use app\frontend\modules\cart\models\CartGoods;
|
|
|
|
class PreCartGoodsExtraCharges extends CartBaseModel
|
|
{
|
|
public $cartGoods;
|
|
|
|
public function setCartGoods(CartGoods $cartGoods)
|
|
{
|
|
$this->cartGoods = $cartGoods;
|
|
|
|
$this->cartGoods->getCartGoodsExtraCharges()->push($this);
|
|
}
|
|
|
|
public function toArray()
|
|
{
|
|
|
|
$this->amount = sprintf('%.2f', $this->amount);
|
|
return parent::toArray(); // TODO: Change the autogenerated stub
|
|
}
|
|
}
|