DGoodsBasic.Class.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * 商品基础数据Dao
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/10/30
  7. * Time: 14:27
  8. */
  9. namespace Jobs\Dao;
  10. class DGoodsBasic extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'default')
  13. {
  14. $this->_table = 'goods_basic';
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. "id", //int(10) NOT NULL AUTO_INCREMENT,
  18. "images", //json DEFAULT NULL COMMENT '商品相册',
  19. "title", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
  20. "code", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品编码',
  21. "barCode", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品条码',
  22. "categoryId", //int(10) NOT NULL default '0' COMMENT '商品分类id',
  23. "categoryPath", //varchar(50) NOT NULL default '' COMMENT '商品分类路径',
  24. "expireTime", //int(10) NOT NULL default '0' COMMENT '过期时间',
  25. "brandId", //int(10) NOT NULL default '0' COMMENT '品牌id',
  26. 'describe', // 商品描述
  27. "tag", //varchar(255) NOT NULL DEFAULT '' COMMENT '关键词',
  28. "link", //varchar(255) NOT NULL DEFAULT '' COMMENT 'link',
  29. "description", //text NOT NULL COMMENT '商品详情',
  30. "noSalesShop", //json DEFAULT NULL COMMENT '禁止销售店铺',
  31. "extends", //json DEFAULT NULL COMMENT '拓展字段',
  32. "enableStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '商品状态 默认5 上线 6下线',
  33. "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 4 删除 5正常',
  34. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  35. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  36. ];
  37. $this->_readonly = ['id'];
  38. $this->_create_autofill = [
  39. 'createTime' => time()
  40. ];
  41. $this->_update_autofill = [
  42. 'updateTime' => time()
  43. ];
  44. parent::__construct($serviceDB);
  45. }
  46. }