DepartmentModel.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace app\common\model;
  3. /**
  4. * 科室信息表
  5. * Class DepartmentModel
  6. * @package app\common\model
  7. */
  8. class DepartmentModel extends BaseModel
  9. {
  10. protected $table='department';
  11. /**
  12. *添加科室
  13. *@param array 科室信息
  14. *@return int 科室id
  15. */
  16. public function department_add($params){
  17. return $this->kuyun_insert($params,'');
  18. }
  19. /**
  20. *查询科室单条信息
  21. *@param array 查询条件
  22. *@return array 科室信息
  23. */
  24. public function department_find($where){
  25. return $this->kuyun_find($where,'','');
  26. }
  27. /**
  28. *科室列表
  29. *@param array 页码
  30. *@param bull
  31. *@return array 所有科室的信息
  32. */
  33. public function department_list($page,$is_count){
  34. return $this->kuyun_select('','','','','',$page,$is_count);
  35. }
  36. /**
  37. *编辑科室
  38. *@param array 添加的数据
  39. *@param array 条件
  40. *@return int
  41. */
  42. public function department_edit($data,$where){
  43. return $this->kuyun_insert($data,$where);
  44. }
  45. /**
  46. *删除科室
  47. *@param array 删除条件
  48. *@return int 返回删除id
  49. */
  50. public function department_delete($where){
  51. return $this->kuyun_delete($where);
  52. }
  53. }