Esempio n. 1
0
 public function __construct()
 {
     parent::__construct();
     $this->table = table_name($this->ins_name);
     $this->createRule = ['name' => 'string', 'name_in_charge' => 'string', 'city_id' => 'required|numeric', 'province_id' => 'required|numeric', 'location_detail' => 'string', 'username' => 'required|unique:' . table_name($this->ins_name), 'password' => 'required|min:6', 'phone' => 'numeric|min:11', 'email' => 'email', 'status' => 'numeric', 'memo' => 'string'];
     $this->updateRule = ['id' => 'required|numeric', 'password' => 'min:6'];
 }
Esempio n. 2
0
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     if (app()->environment() === 'production') {
         $this->setConnection('mysql-hr');
     }
 }
Esempio n. 3
0
 public function __construct()
 {
     parent::__construct();
     $this->table = table_name($this->ins_name);
     $this->createRule = ['name' => 'required', 'username' => 'required|unique:' . table_name($this->ins_name), 'password' => 'required|min:6', 'hospital_id' => 'required|exists:' . table_name('hospital') . ',id'];
     $this->updateRule = ['id' => 'required|numeric'];
 }
Esempio n. 4
0
 public function __construct()
 {
     parent::__construct();
     $this->createRule = ['cust_id' => 'required|unique:i_robot|regex:/^[0-9]{2}[A-L]{1}[0-9]{4}$/', 'employee_id' => 'required|exists:i_employee,id', 'production_date' => 'required|date'];
     //$this->messages['regex'] = '字段 :attribute 格式错误';
     $this->messages['regex'] = '该值格式错误';
 }
Esempio n. 5
0
 public function __construct()
 {
     parent::__construct();
     $this->createRule = ['city_id' => 'required|numeric', 'province_id' => 'required|numeric', 'localtion_detail' => 'string', 'name' => 'required|unique:i_hospital,name', 'memo' => 'string'];
     $this->updateRule = [];
     $this->messages['name.unique'] = '医院名字已存在';
 }
Esempio n. 6
0
 public function __construct()
 {
     parent::__construct();
     $this->table = table_name($this->ins_name);
     $this->createRule = ['name' => 'required', 'username' => 'required|unique:' . table_name($this->ins_name), 'password' => 'required|alpha_num|min:6', 'phone' => 'required', 'email' => 'required|email', 'status' => 'numeric', 'memo' => 'string'];
     $this->updateRule = ['id' => 'required|numeric', 'username' => 'unique:' . table_name($this->ins_name) . ',username,' . rq('id'), 'password' => 'alpha_num|min:6'];
     $this->messages = ['username.required' => '用户名必填', 'username.unique' => '用户名已被使用', 'password.required' => '密码必填', 'password.min' => '密码至少有6位字母或者数字', 'phone.required' => '手机号码必填', 'email.required' => '电子邮箱必填', 'email.email' => '邮箱格式有误'];
 }
Esempio n. 7
0
 function __construct($init = [])
 {
     if (is_array($init)) {
         return parent::__construct($init);
     } else {
         $this->name = $init;
     }
 }
Esempio n. 8
0
 public function __construct()
 {
     parent::__construct();
     $this->table = table_name($this->ins_name, 'i');
     $this->createRule = ['email' => 'required|email', 'name' => 'required', 'phone' => 'required'];
     $this->updateRule = ['email' => 'required|email', 'name' => 'required', 'phone' => 'required'];
     $this->messages = ['phone.required' => '手机号码必填', 'email.required' => '电子邮箱必填', 'email.email' => '邮箱格式有误'];
 }
Esempio n. 9
0
 public function __construct()
 {
     parent::__construct();
     $this->table = table_name($this->ins_name);
     $this->createRule = ['name' => 'required', 'username' => 'required|unique:' . table_name($this->ins_name), 'password' => 'required|min:6|regex:/^(?=.*[a-zA-Z])(?=.*[\\d])[a-zA-Z\\d].+$/', 'hospital_id' => 'required|exists:' . table_name('hospital') . ',id'];
     $this->updateRule = ['id' => 'required|numeric', 'password' => 'min:6|regex:/^(?=.*[a-zA-Z])(?=.*[\\d])[a-zA-Z\\d].+$/'];
     $this->messages = ['password.regex' => '密码不符合要求,必选包含字母和数字', 'password.min' => '密码必须大于6位'];
 }
Esempio n. 10
0
 public function __construct()
 {
     parent::__construct();
     $this->table = table_name($this->ins_name);
     $this->createRule = ['name' => 'required', 'username' => 'required|unique:' . table_name($this->ins_name), 'password' => 'required|min:6|regex:/^(?=.*[a-zA-Z])(?=.*[\\d])[a-zA-Z\\d].+$/', 'phone' => 'required', 'email' => 'required|email', 'status' => 'numeric', 'memo' => 'string'];
     $this->updateRule = ['id' => 'required|numeric', 'username' => 'unique:' . table_name($this->ins_name) . ',username,' . rq('id'), 'password' => 'min:6|regex:/^(?=.*[a-zA-Z])(?=.*[\\d])[a-zA-Z\\d].+$/'];
     $this->messages = ['username.required' => '用户名必填', 'username.unique' => '用户名已被使用', 'password.required' => '密码必填', 'password.regex' => '密码不符合要求,必选包含字母和数字', 'password.min' => '密码必须大于6位', 'phone.required' => '手机号码必填', 'email.required' => '电子邮箱必填', 'email.email' => '邮箱格式有误'];
 }
Esempio n. 11
0
 public function __construct()
 {
     parent::__construct();
     $this->table = table_name($this->ins_name, 'i');
     // $this->createRule = [
     //     'email' => 'required|email',
     //     'name' => 'required'
     // ];
 }
Esempio n. 12
0
 function __construct($init = [])
 {
     $this->_tables = [];
     if (is_array($init)) {
         parent::__construct($init);
     } else {
         $this->name = $init;
     }
     if (!$this->name) {
         $this->name = data_db_name();
     }
     static::$list[$this->name] = $this;
 }
Esempio n. 13
0
 function __construct($init = [], $db_name = NULL, $db = NULL)
 {
     if (is_array($init)) {
         return parent::__construct($init);
     } else {
         $this->name = $init;
     }
     if ($db_name) {
         $this->db_name = $db_name;
     }
     if ($db) {
         $this->db = ref($db);
     }
     if ($this->db_name && !$this->db) {
         $this->db = ref(Database::by_name($db_name));
     }
     $this->__owner = ref($this->db);
 }
Esempio n. 14
0
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
 }
Esempio n. 15
0
 public function __construct()
 {
     parent::__construct();
     $this->createRule = ['city_id' => 'required|numeric', 'province_id' => 'required|numeric', 'localtion_detail' => 'string', 'name' => 'required', 'memo' => 'string'];
     $this->updateRule = [];
 }
Esempio n. 16
0
 public function __construct()
 {
     parent::__construct();
     $this->table = table_name($this->ins_name, 'v');
 }
Esempio n. 17
0
 function __construct()
 {
     parent::__construct();
 }
Esempio n. 18
0
 function __construct()
 {
     parent::__construct();
     $this->createRule = ['k' => 'required|exists:i_setting,k', 'v' => 'json'];
 }