| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- /**
- *------Create thems Model------
- *------SCWPHP Version 1.0.0------
- *------Dev Model Jions------
- *------Create Time 2017-06-13 18:45:24------
- */
- namespace App\Commons\Model;
- use \System\Model;
- class Account extends Model {
- public $timestamps = false;
- protected $table = 'account';
- private function getFeild($num) {
- $data = array(
- '1' => 'id',
- '2' => 'identity',
- '3' => 'account',
- '4' => 'status',
- );
- return $data[$num];
- }
-
- function getinfo($value, $type = 1){
- $key = $this->getFeild($type);
- $data = $this->where($key, $value)->first();
- if (!$data) {
- return -30203000202;
- }
- return $data->toArray();
- }
- }
|