/**
  * @param AccountTwrPeriod $model
  * @return mixed
  */
 public function save(AccountTwrPeriod $model)
 {
     $result = $this->fpdo->from($this->table)->where('account_number', $model->getAccountNumber())->limit(1)->fetch('id');
     return $result ? $this->update($result, $model) : $this->insert($model);
 }