DAccountType.Class.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: kang
  5. * Date: 2021/3/6
  6. * Time: 15:08
  7. */
  8. namespace JinDouYun\Dao\Finance;
  9. use JinDouYun\Dao\BaseDao;
  10. class DAccountType extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'default')
  13. {
  14. $this->_table = "account_type";
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. 'id', //int(10) NOT NULL AUTO_INCREMENT COMMENT '费用类型主键id',
  18. 'enterpriseId',//企业id
  19. 'name', //char(255) NOT NULL COMMENT '账目类型',
  20. 'type', //tinyint(10) NOT NULL COMMENT '收支类型 5收入 4支出',
  21. 'remarks', //varchar(255) NOT NULL COMMENT '备注',
  22. 'createTime', //int(11) NOT NULL COMMENT '创建时间',
  23. 'updateTime', //int(11) NOT NULL COMMENT '修改时间',
  24. 'extends', //json DEFAULT NULL COMMENT '扩展',
  25. 'deleteStatus' //删除状态
  26. ];
  27. $this->_readonly = ['id'];
  28. $this->_create_autofill = [
  29. 'createTime' => time()
  30. ];
  31. $this->_update_autofill = [
  32. 'updateTime' => time()
  33. ];
  34. parent::__construct($serviceDB);
  35. }
  36. }