36], [['type'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'status' => 'Status', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'mall_id' => 'Mall ID', 'request' => 'Request', 'response' => 'Response', 'out_biz_no' => 'Out Biz No', ]; } /** * 新增记录 * @param int $mall_id * @param string $out_biz_no * @param string $type * @param array $request * @param array $response * @return mixed|string|true */ public static function create(int $mall_id, string $out_biz_no, string $type, array $request, array $response) { $model = new AlipayTransfer(); $model->mall_id = $mall_id; $model->out_biz_no = $out_biz_no; $model->type = $type; $model->request = Json::encode($request); $model->response = Json::encode($response); if (!$model->save()) { return $model->getError(); } return true; } }