DGoodsGroups.Class.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Gss
  5. * Date: 2021/4/15 0015
  6. * Time: 14:49
  7. */
  8. namespace JinDouYun\Dao\Goods;
  9. use JinDouYun\Dao\BaseDao;
  10. class DGoodsGroups extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'default')
  13. {
  14. $this->_table = 'qianniao_goods_groups_1';
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. 'id',//int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  18. 'name',//varchar(255) NOT NULL COMMENT '分组名称',
  19. 'explain',//text COMMENT '描述',
  20. 'sort',//int(10) DEFAULT '0' COMMENT '排序 从大到小',
  21. 'status',//tinyint(1) NOT NULL DEFAULT '5' COMMENT '状态 5启动/4禁用',
  22. 'deleteStatus',//tinyint(1) NOT NULL DEFAULT '5' COMMENT '删除状态 5正常/4删除',
  23. 'createTime',//int(10) NOT NULL COMMENT '创建时间',
  24. 'updateTime',//int(10) DEFAULT NULL COMMENT '更新时间',
  25. 'extends',//json DEFAULT NULL COMMENT '扩展字段',
  26. ];
  27. $this->_readonly = ['id'];
  28. $this->_create_autofill = [
  29. 'createTime' => time()
  30. ];
  31. $this->_update_autofill = [
  32. 'updateTime' => time()
  33. ];
  34. parent::__construct($serviceDB);
  35. }
  36. }