DRole.Class.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * 职工管理Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/10/31
  7. * Time: 18:00
  8. */
  9. namespace JinDouYun\Dao\Department;
  10. use JinDouYun\Dao\BaseDao;
  11. class DRole extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'department_role';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "shopId", //int(10) DEFAULT NULL COMMENT '商铺id',
  20. "roleName", //varchar(255) NOT NULL COMMENT '角色名称',
  21. "pid", //int(10) NOT NULL COMMENT '上级id',
  22. "deleteStatus", //tinyint(3) DEFAULT '5' COMMENT '删除状态 4:删除 5:正常',
  23. "updateTime", //int(10) DEFAULT NULL COMMENT '更新时间',
  24. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  25. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  26. "signId", //int(10) DEFAULT '0' COMMENT '标示id',
  27. ];
  28. $this->_readonly = ['id'];
  29. $this->_create_autofill = [
  30. 'createTime' => time()
  31. ];
  32. $this->_update_autofill = [
  33. 'updateTime' => time()
  34. ];
  35. parent::__construct($serviceDB);
  36. }
  37. }