DCart.Class.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * 购物车Dao
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/11/6
  7. * Time: 16:13
  8. */
  9. namespace JinDouYun\Dao\Cart;
  10. use JinDouYun\Dao\BaseDao;
  11. class DCart extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'cart';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id",//int(10) NOT NULL AUTO_INCREMENT,
  19. "skuId",// json DEFAULT NULL COMMENT 'skuId',
  20. "goodsCode",//varchar(255) NOT NULL DEFAULT '' COMMENT '商品编号',
  21. "goodsId",//int(10) NOT NULL DEFAULT '0' COMMENT '商品Id',
  22. "buyNum",//int(10) NOT NULL COMMENT '购买数量',
  23. "userCenterId",//int(10) NOT NULL DEFAULT '0' COMMENT 'userCenterId',
  24. "shopId",//int(10) NOT NULL DEFAULT '0' COMMENT '店铺Id',
  25. "shopCode",//varchar(255) DEFAULT '' COMMENT '店铺编码',
  26. "selection",//tinyint(3) NOT NULL DEFAULT '4' COMMENT '是否选中 默认4 未选中 5已选中',
  27. "source",//tinyint(3) DEFAULT NULL COMMENT '订单来源 默认1 ios 2android 3小程序 4后台创建',
  28. "extends",//json DEFAULT NULL COMMENT '拓展字段',
  29. "createTime",//int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  30. "updateTime",//int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  31. "goodsBasicId",//int(10) NOT NULL DEFAULT '0' COMMENT '',
  32. "warehouseId",//仓库id
  33. "activityId",//int(10) NOT NULL DEFAULT '0' COMMENT '活动id',
  34. "cashierUid"//cashierUid
  35. ];
  36. $this->_readonly = ['id'];
  37. $this->_create_autofill = [
  38. 'createTime' => time()
  39. ];
  40. $this->_update_autofill = [
  41. 'updateTime' => time()
  42. ];
  43. parent::__construct($serviceDB);
  44. }
  45. }