DSku.Class.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * 规格
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/11/18
  7. * Time: 18:25
  8. */
  9. namespace JinDouYun\Dao\GoodsManage;
  10. use JinDouYun\Dao\BaseDao;
  11. class DSku extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'sku';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id",//int(10) NOT NULL AUTO_INCREMENT,
  19. "goodsId",//int(10) NOT NULL DEFAULT '0' COMMENT '商品id',
  20. "conversion",//decimal(10,2) DEFAULT NULL COMMENT '换算比率',
  21. "unitId",//int(10) DEFAULT NULL COMMENT '单位id',
  22. "unitName",//varchar(50) DEFAULT '' COMMENT '单位名称',
  23. "isMaster",//tinyint(3) DEFAULT '4' COMMENT '是否主单位 默认4 否 5是',
  24. "deleteStatus",//tinyint(3) DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
  25. "extends",//json DEFAULT NULL COMMENT '拓展字段',
  26. "createTime",//int(10) DEFAULT '0' COMMENT '创建时间',
  27. "updateTime",//int(10) DEFAULT '0' COMMENT '更新时间',
  28. "specType",//tinyint(3) DEFAULT '1' COMMENT '规格类型 默认1 单规格 2多规格',
  29. "specImage",//json DEFAULT NULL COMMENT '规格图片',
  30. "specData",//json DEFAULT NULL COMMENT '规格明细',
  31. "specGroupHash",// varchar(255) NOT NULL DEFAULT '' COMMENT '属性明细hash',
  32. "barCode",//varchar(255) NOT NULL DEFAULT '' COMMENT '条码',
  33. 'isDefault',//是否默认 4=>否 5=>是
  34. 'weight',
  35. 'isNew'
  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. }