示例#1
0
 public function deleteRecord($id, AuthModel $auth)
 {
     $result = 0;
     if ($this->getRecord($id)) {
         $data = array('delete_flag' => 1, 'updated_at' => time(), 'updated_by' => $auth->getLoginUser()['staff_id']);
         $where = array('id' => $id);
         $result = $this->update($data, $where);
     } else {
         throw new \Exception("該当レコードが見つかりませんでした。  {$id}");
     }
     return $result;
 }