| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace App\Model;
- use Illuminate\Database\Eloquent\Model;
- /**
- * 菜单管理
- * Class Unit
- * @package App\Models
- */
- class Employee extends Model
- {
- protected $table = "employee"; //指定表
- const CREATED_AT = 'crt_time';
- const UPDATED_AT = 'upd_time';
- protected $dateFormat = 'U';
- const USE = 1;
- const NOT_USE = 2;
- const IS_ADMIN = 1;
- const IS_NOT_ADMIN = 0;
- const SPECIAL_ADMIN = 1;
- const IS_TECHNICAL = [
- 0 => '否',
- 1 => '是'
- ];
- //人员状态
- const STATUS_ONE = 1;
- const STATUS_TWO = 2;
- const STATUS = [
- 1 => '正常',
- 2 => '停用'
- ];
- public function setConnection($name)
- {
- $mysql = "mysql";
- if($name === '001') $mysql = "mysql_001";
- if($name === '002') $mysql = "mysql_002";
- return parent::setConnection($mysql); // TODO: Change the autogenerated stub
- }
- }
|