DShopProject.Class.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 DShopProject extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'shop_project';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id",// int unsigned NOT NULL AUTO_INCREMENT,
  19. 'enterprise_id',// int NOT NULL COMMENT '商店id',
  20. "shop_id",// int NOT NULL COMMENT '商店id',
  21. "name",// varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目名称',
  22. "image",//varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '封面图',
  23. "slider_image",// varchar(2550) COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  24. "price",// decimal(10,2) NOT NULL COMMENT '现价',
  25. "ot_price",// decimal(10,2) NOT NULL COMMENT '原价',
  26. "cost_price",// decimal(10,2) NOT NULL COMMENT '成本价',
  27. "info",// varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '简介',
  28. "result",// text COLLATE utf8mb4_general_ci COMMENT '介绍',
  29. "is_show",// tinyint NOT NULL DEFAULT '1' COMMENT '0下架1使用',
  30. "service_time",// int DEFAULT NULL COMMENT '服务时间',
  31. "createTime",// int DEFAULT NULL COMMENT '创建时间',
  32. "commission",// decimal(10,2) DEFAULT NULL COMMENT '提成比列',
  33. ];
  34. $this->_readonly = ['id'];
  35. $this->_create_autofill = [
  36. 'createTime' => time()
  37. ];
  38. parent::__construct($serviceDB);
  39. }
  40. }