DAgents.Class.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * 代理商Dao
  4. * Created by PhpStorm.
  5. * User: liuli
  6. * Date: 2021/6/24
  7. * Time: 12:00
  8. */
  9. namespace JinDouYun\Dao\Agent;
  10. use JinDouYun\Dao\BaseDao;
  11. class DAgents extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'agent';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "workName", //varchar(50) DEFAULT '' COMMENT '公司名称',
  20. "contact", //json DEFAULT NULL COMMENT '联系人'
  21. "address", //varchar(255) DEFAULT '' COMMENT '公司地址',,
  22. "initiateStatus", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '启用状态(0禁用 1启用)',
  23. "deleteStatus", //tinyint(3) DEFAULT '5' COMMENT '删除状态 4:删除 5:正常',
  24. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  25. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  26. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  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. }