32], [['account_number'], 'string', 'max' => 64], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => 'Mall ID', 'book_id' => 'Book ID', 'amount' => 'Amount', 'account_name' => 'Account Name', 'account_number' => 'Account Number', 'response' => 'Response', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } /** * 添加提现数据 * * @param array $data * @return static|false */ public static function addLog(array $data) { $model = new static(); $model->load($data, ''); return $model->save() ? $model : false; } /** * @param array|string $response * @return void */ public function setResponse($response) { $this->response = is_array($response) ? json_encode($response) : $response; $this->save(); } }