255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => 'Mall ID', 'user_id' => 'User ID', 'order_no' => 'Order No', 'type' => 'Type', 'child_id' => 'Child ID', 'num' => 'Num', 'money' => 'Money', 'goods_id' => 'Goods ID', 'status' => 'Status', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } public static function add($params) { try { $model = new self(); $model->loadDefaultValues(); if (!$model->load($params, '')) throw new \Exception($model->getErrorMessage()); if (!$model->save()) throw new \Exception($model->getErrorMessage()); return $model; } catch (\Exception $e) { self::$static_error = $e->getMessage(); return false; } } }