DGoods.Class.php 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: wxj
  5. * Date: 2019/10/30
  6. * Time: 14:17
  7. */
  8. namespace JinDouYun\Dao\Goods;
  9. use JinDouYun\Dao\BaseDao;
  10. class DGoods extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'default')
  13. {
  14. $this->_table = 'goods';
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. "id",//int(11) NOT NULL AUTO_INCREMENT COMMENT '商品id',
  18. "basicGoodsId",//int(11) NOT NULL COMMENT '关联商品基本资料id',
  19. "shopId",//int(10) NOT NULL DEFAULT '0' COMMENT '商铺id',
  20. "merchantId",//int(10) DEFAULT NULL COMMENT '商户id',
  21. "staffId",//int(10) DEFAULT '0' COMMENT '创建商品员工id',
  22. "images",//json NOT NULL COMMENT '图集',
  23. "serviceInfo",//int(11) DEFAULT NULL COMMENT '服务保证',
  24. "specification",//json DEFAULT NULL COMMENT '商品规格',
  25. "content",//text COMMENT '商品详情',
  26. "extend",//json DEFAULT NULL COMMENT '扩展字段',
  27. "sort",//int(11) DEFAULT '0' COMMENT '排序',
  28. "isRecommend",//tinyint(4) DEFAULT '4' COMMENT '是否推荐(5是 4否)',
  29. "deleteStatus",//tinyint(4) DEFAULT '5' COMMENT '删除状态(5未删除 4已删除)',
  30. "createTime",//int(10) DEFAULT NULL,
  31. "updateTime",//int(10) DEFAULT NULL COMMENT '修改时间',
  32. "salesNum",//json DEFAULT NULL COMMENT '销量',
  33. "enableStatus",//tinyint(1) DEFAULT '4' COMMENT '上下架(5上架 4下架)',
  34. "specType",//tinyint(3) DEFAULT '1' COMMENT '规格类型 默认1 单规格 2多规格',
  35. "isJoinCommission",//tinyint(3) DEFAULT '4' COMMENT '是否分销 5参与 4不参与',
  36. "isDefine",//tinyint(3) DEFAULT '4' COMMENT '是否自定义 分销比例',
  37. "retType",
  38. "topTime",//int(10) DEFAULT '0' COMMENT '置顶时间',
  39. "virtualSalesNum",//varchar(50) DEFAULT '0' COMMENT '虚拟销量',
  40. "deliverySupIds",//varchar(50) DEFAULT '1,2' COMMENT '物流支持',
  41. "expressType",//tinyint(3) DEFAULT '1' COMMENT '1 包邮 2 运费模版 3 统一运费',
  42. "ruleId",//int(10) DEFAULT '0' COMMENT '运费模版id',
  43. "expressFee",//decimal(10,2) DEFAULT '0.00' COMMENT '统一运费',
  44. "showExpress",//tinyint(3) DEFAULT '4' COMMENT '是否展示快递 4 步展示 5展示',
  45. "auditStatus",//tinyint(3) DEFAULT '2' COMMENT '审核状态 默认1 待审 2审核通过 3 审核未通过 4 审核中',
  46. "isOption",//tinyint(3) DEFAULT '4' COMMENT '5 自选商品',
  47. "supplierId",//int(10) DEFAULT '0' COMMENT '供应商id',
  48. "isShield",//tinyint(3) DEFAULT '4' COMMENT '经营范围屏蔽是否开启 4关闭 5开启',
  49. "notArea",//json DEFAULT NULL COMMENT '地区屏蔽',
  50. "notCustomerType",//varchar(255) DEFAULT '' COMMENT '屏蔽客户类型 1,2,3',
  51. "notCustomer",//varchar(255) DEFAULT '' COMMENT '屏蔽客户 1,2',
  52. "isDistribution",
  53. "support" ,//varchar(255) DEFAULT NULL COMMENT '商品服务',
  54. "goodsGroups",// varchar(255) DEFAULT NULL COMMENT '商品分组',
  55. "realSalesNum",// int(10) DEFAULT NULL COMMENT '真实销量',
  56. "showMinUnitPrice", //tinyint(3) DEFAULT '4' COMMENT '属性最小单位价格是否展示 默认 4 不展示',
  57. ];
  58. $this->_readonly = ['id'];
  59. $this->_create_autofill = [
  60. 'createTime' => time()
  61. ];
  62. $this->_update_autofill = [
  63. 'updateTime' => time()
  64. ];
  65. parent::__construct($serviceDB);
  66. }
  67. }