PreviewTypeEnum::getKeys()], ['shipping_type', 'in', 'range' => ShippingTypeEnum::getKeys()], [['company_id'], 'integer', 'min' => 0], [['pay_type', 's_address'], 'integer', 'min' => 0], [['combination_num', 'combination_id'], 'integer', 'min' => 1], [['shipping_type'], 'required', 'on' => ['create']], [['transaction'], 'safe'], ]; } /** * @return array */ public function attributeLabels() { return ArrayHelper::merge(parent::attributeLabels(), [ 'mall_id' => '商城ID', 'use_score' => '抵现积分', 'max_use_score' => '最大可使用积分', 'address_id' => '收货地址', 'address' => '收货地址', 'is_logistics' => '运费模板可选', 'pickup_id' => '自提点', 'buyer_self_lifting' => '自提开启', 'pickup_point_is_open' => '自提运费开启', 'pickup_point_fee' => '自提运费', 'pickup_point_freight' => '自提满X包邮', 'is_full_mail' => '包邮', 'invoice_id' => '发票', 'orderProducts' => '生成的订单产品', 'defaultProducts' => '默认的系统产品', 'sku' => 'sku数据', 'member' => '用户', 'data' => '数据', 'type' => '数据类型', 'coupon' => '优惠券', 'marketing_id' => '营销ID', 'marketing_type' => '营销类型', 'pay_type' => '支付方式', 'transaction' => '流水', ]); } /** * 获取用户默认逻辑模型 * @Author bing * @DateTime 2021-09-22 19:48:46 * @copyright: Copyright (c) 2020 广东七件事集团 * @param $mall_id * @param $user_id * @return object */ public function getDefaultForm($mall_id, $user_id) { $model = new self(); $model->mall_id = $mall_id; $model->user_id = $user_id; return $model; } public function addAttribute($name) { $attributes = parent::attributes(); $attributes[] = $name; return $this; } }