DSpec.Class.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace JinDouYun\Dao\GoodsManage;
  3. use JinDouYun\Dao\BaseDao;
  4. /**
  5. * 规格名关系表
  6. * Class DSpec
  7. * @package JinDouYun\Dao\GoodsManage
  8. */
  9. class DSpec extends BaseDao
  10. {
  11. public function __construct($serviceDB = 'default')
  12. {
  13. $this->_table = 'spec';
  14. $this->_primary = 'id';
  15. $this->_fields = [
  16. "id",//int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '规格组id',
  17. "pid",//int(11) NOT NULL default 0 COMMENT '属性名:0 属性值:属性名ID',
  18. "specName",//varchar(255) NOT NULL DEFAULT '' COMMENT '规格组名称(属性名名称 或属性值名称)',
  19. "extends",//json DEFAULT NULL COMMENT '拓展字段',
  20. "createTime",//int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  21. "updateTime",//int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  22. "deleteStatus",//tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
  23. "hidden",// varchar(255) NOT NULL DEFAULT 5 COMMENT '5 不隐藏 4隐藏',
  24. ];
  25. $this->_readonly = ['id'];
  26. $this->_create_autofill = [
  27. 'createTime' => time()
  28. ];
  29. $this->_update_autofill = [
  30. 'updateTime' => time()
  31. ];
  32. parent::__construct($serviceDB);
  33. }
  34. }