SupplierModel.php 623 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace app\common\model;
  3. class SupplierModel extends BaseModel
  4. {
  5. protected $table = 'erp_supplier';
  6. protected function genSchema(array $schema)
  7. {
  8. // TODO: Implement genSchema() method.
  9. }
  10. public function findAll() {
  11. return $this->where('is_delete', 0)->select();
  12. }
  13. public function findByPaginate(array $params) {
  14. $where = [
  15. ['is_delete', '=', 0]
  16. ];
  17. return $this->where($where)
  18. ->order('create_time','desc')
  19. ->paginate(['list_rows'=>10, "query" => $params]);
  20. }
  21. }