| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace app\common\model;
- class DepartmentModel extends BaseModel
- {
- protected $table = 'erp_department';
- protected function genSchema(array $schema)
- {
- // TODO: Implement genSchema() method.
- }
- public function fetchAllDepartment() {
- return $this->where('is_delete',0)->select();
- }
- public function findByName($name) {
- return $this->where([
- ['is_delete', '=', 0],
- ['name', '=', $name]
- ])->find();
- }
- function findAllDepartment() {
- return $this->where([
- ['is_delete', '=', 0],
- ])->select();
- }
- }
|