DIntegralGoods.Class.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * 积分商品Dao
  4. * Created by PhpStorm.
  5. * User: haoren
  6. * Date: 2021/03/25
  7. * Time: 15:00
  8. */
  9. namespace JinDouYun\Dao\Integral;
  10. use JinDouYun\Dao\BaseDao;
  11. class DIntegralGoods extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'integral_goods';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "shopId", //int(10) DEFAULT '0' COMMENT '商铺id',
  20. "name", //varchar(255) DEFAULT NULL COMMENT '商品名称',
  21. "images", //json DEFAULT NULL COMMENT '商品图片',
  22. "integral", //decimal(10,2) DEFAULT NULL COMMENT '积分价格',
  23. "sort", //int(10) DEFAULT '0' COMMENT '排序 从大到小',
  24. "limit", //int(10) DEFAULT '0' COMMENT '每人限购',
  25. "num", //int(10) DEFAULT '0' COMMENT '剩余数量',
  26. "changeNum", //int(10) DEFAULT '0' COMMENT '兑换数量',
  27. "desc", //text COMMENT '详情',
  28. "enableStatus", //tinyint(1) DEFAULT '5' COMMENT '启用状态 4:禁用 5:启用',
  29. "deleteStatus", //tinyint(1) DEFAULT '5' COMMENT '删除状态 4:删除 5:正常',
  30. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  31. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  32. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  33. ];
  34. $this->_readonly = ['id'];
  35. $this->_create_autofill = [
  36. 'createTime' => time()
  37. ];
  38. $this->_update_autofill = [
  39. 'updateTime' => time()
  40. ];
  41. parent::__construct($serviceDB);
  42. }
  43. }