50], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => 'Mall ID', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'status' => 'Status', 'goods_id' => 'Goods ID', 'third_goods_id' => 'Third Goods ID', 'cost_price' => 'Cost Price', 'price' => 'Price', 'original_price' => 'Original Price', 'third_spec_id' => 'Third Spec ID', 'goods_attr_id' => 'Goods Attr ID', 'sign_id' => 'Sign ID', ]; } public static function setData(array $params) { $model = new self(); $model->loadDefaultValues(); $model->load($params, ''); if (!$model->save()) throw new \Exception($model->getErrorMessage()); } }