admin/app/frontend/modules/cart/discount/models/PreCartDiscount.php

36 lines
660 B
PHP

<?php
/**
* Created by PhpStorm.
*
*
*
* Date: 2021/4/30
* Time: 17:52
*/
namespace app\frontend\modules\cart\discount\models;
use app\frontend\modules\cart\models\CartBaseModel;
use app\frontend\modules\cart\models\ShopCart;
class PreCartDiscount extends CartBaseModel
{
// protected $shopCart;
//
// public function setShop(ShopCart $shopCart)
// {
// $this->shopCart = $shopCart;
//
// $this->shopCart->getCartDiscounts()->push($this);
//
// }
public function toArray()
{
$this->amount = sprintf('%.2f', $this->amount);
return parent::toArray(); // TODO: Change the autogenerated stub
}
}