| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace app\common\model;
- class StoreModel extends BaseModel
- {
- protected $table = 'erp_store';
- protected function genSchema(array $schema)
- {
- // TODO: Implement genSchema() method.
- }
- public function findAllStore() {
- return $this->order('id','desc')->select();
- }
- public function doesItExist($abbr) {
- return $this->where([
- ["abbr", '=', $abbr],
- ["is_delete", '=', 0]
- ])->find();
- }
- public function findByPaginate(array $params) {
- $where = [
- ['is_delete', '=', 0]
- ];
- return $this->where($where)->order('create_time','desc')->paginate(['list_rows'=>10, "query" => $params]);
- }
- }
|