DShopCard.Class.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 DShopCard extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'shop_card';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id",// int unsigned NOT NULL AUTO_INCREMENT,
  19. "shop_id",// int NOT NULL,
  20. "name",// varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  21. "price", //decimal(10,2) NOT NULL COMMENT '价格',
  22. "ot_price",// decimal(10,2) NOT NULL COMMENT '原价',
  23. "status",// tinyint NOT NULL DEFAULT '1' COMMENT '0禁用1正常',
  24. "image",// varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '封面图',
  25. "info",// varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '简介',
  26. "introduce",// text COLLATE utf8mb4_general_ci COMMENT '详情介绍',
  27. "createTime",// int DEFAULT NULL COMMENT '创建时间',
  28. ];
  29. $this->_readonly = ['id'];
  30. $this->_create_autofill = [
  31. 'createTime' => time()
  32. ];
  33. parent::__construct($serviceDB);
  34. }
  35. }