DGoodsBasic.Class.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * 商品基础数据Dao
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/10/30
  7. * Time: 14:27
  8. */
  9. namespace JinDouYun\Dao\GoodsManage;
  10. use JinDouYun\Dao\BaseDao;
  11. class DGoodsBasic extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'goods_basic';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT,
  19. "images", //json DEFAULT NULL COMMENT '商品相册',
  20. "merchantId", // int(10) DEFAULT NULL COMMENT '商户id',
  21. "title", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
  22. "condition",//搜索条件
  23. "code", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品编码',
  24. "barCode", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品条码',
  25. "categoryId", //int(10) NOT NULL default '0' COMMENT '商品分类id',
  26. "categoryPath", //varchar(50) NOT NULL default '' COMMENT '商品分类路径',
  27. "expireTime", //int(10) NOT NULL default '0' COMMENT '过期时间',
  28. "brandId", //int(10) NOT NULL default '0' COMMENT '品牌id',
  29. 'describe', // 商品描述
  30. "tag", //varchar(255) NOT NULL DEFAULT '' COMMENT '关键词',
  31. "link", //varchar(255) NOT NULL DEFAULT '' COMMENT 'link',
  32. "description", //text NOT NULL COMMENT '商品详情',
  33. "noSalesShop", //json DEFAULT NULL COMMENT '禁止销售店铺',
  34. "extends", //json DEFAULT NULL COMMENT '拓展字段',
  35. "enableStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '商品状态 默认5 上线 6下线',
  36. "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 4 删除 5正常',
  37. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  38. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  39. "addUserId",//添加用户
  40. "salesManId",//添加业务员id
  41. "specGroup",//规格组
  42. "specType",//规格类型
  43. "storeId",//发布此商品的商户id
  44. "level",// tinyint(3) NOT NULL DEFAULT '5' COMMENT '商品级别 4商户 5平台',
  45. "supplierId",//供应商id
  46. "isEq"
  47. ];
  48. $this->_readonly = ['id'];
  49. $this->_create_autofill = [
  50. 'createTime' => time()
  51. ];
  52. $this->_update_autofill = [
  53. 'updateTime' => time()
  54. ];
  55. parent::__construct($serviceDB);
  56. }
  57. }