DStaffStock.Class.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * 职工股份记录
  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 DStaffStock extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'staff_stock';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. 'id',// int unsigned NOT NULL AUTO_INCREMENT,
  19. 'en_id',// int NOT NULL,
  20. 'staff_id',// int NOT NULL,
  21. 'pm',// tinyint NOT NULL COMMENT '1增加2减少',
  22. 'number',// decimal(10,2) NOT NULL COMMENT '数量',
  23. 'before',// decimal(10,2) NOT NULL COMMENT '之前',
  24. 'after',// decimal(10,2) NOT NULL COMMENT '之后',
  25. 'mark',// varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  26. 'createTime',// int NOT NULL COMMENT '时间',
  27. ];
  28. $this->_readonly = ['id'];
  29. $this->_create_autofill = [
  30. 'createTime' => time()
  31. ];
  32. parent::__construct($serviceDB);
  33. }
  34. }