DShopTemplate.Class.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * 打卡时间模板
  4. * Created by PhpStorm.
  5. * User: wxj
  6. * Date: 2019/10/31
  7. * Time: 15:02
  8. */
  9. namespace JinDouYun\Dao\Shop;
  10. use JinDouYun\Dao\BaseDao;
  11. class DShopTemplate extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'shop_template';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", // int unsigned NOT NULL AUTO_INCREMENT,
  19. "shop_id", // int NOT NULL COMMENT '商店id',
  20. "name",// varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  21. "shift_id",// int NOT NULL COMMENT '班次id',
  22. "single_time",// decimal(10,2) NOT NULL COMMENT '单次打卡奖励',
  23. 'time',// text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '时间',
  24. "createTime", // int DEFAULT NULL COMMENT '创建时间',
  25. ];
  26. $this->_readonly = ['id'];
  27. $this->_create_autofill = [
  28. 'createTime' => time()
  29. ];
  30. parent::__construct($serviceDB);
  31. }
  32. }