// +---------------------------------------------------------------------- declare (strict_types=1); namespace app\api\service\order\source\checkout; use app\common\service\BaseService; use app\api\model\User as UserModel; /** * 订单结算台扩展基类 * Class Basics * @package app\api\service\order\source\checkout */ abstract class Basics extends BaseService { /* @var UserModel $user 当前用户信息 */ protected UserModel $user; // 订单结算商品列表 protected iterable $goodsList; /** * 构造方法 * Checkout constructor. * @param UserModel $user * @param iterable $goodsList */ public function __construct(UserModel $user, iterable $goodsList) { parent::__construct(); $this->user = $user; $this->goodsList = $goodsList; } /** * 验证商品列表 * @return mixed */ abstract public function validateGoodsList(); }