DIntegralGoodsExchange.Class.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 DIntegralGoodsExchange extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'integral_goods_exchange';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  19. "no", //varchar(255) DEFAULT NULL COMMENT '单号',
  20. "userCenterId", //int(10) DEFAULT NULL COMMENT '用户id',
  21. "customerId", //int(10) DEFAULT NULL COMMENT '客户id',
  22. "goodsId", //int(10) DEFAULT NULL COMMENT '积分商品id',
  23. "shopId", //int(10) DEFAULT '0' COMMENT '商铺id',
  24. "num", //int(10) DEFAULT NULL COMMENT '兑换数量',
  25. "integral", //decimal(10,2) DEFAULT NULL COMMENT '积分单价',
  26. "amount", //decimal(10,2) DEFAULT NULL COMMENT '积分总价',
  27. "address", //json DEFAULT NULL COMMENT '收货地址',
  28. "remark", //varchar(255) NOT NULL COMMENT '备注',
  29. "reason", //varchar(255) DEFAULT NULL COMMENT '失效原因',
  30. "status", //tinyint(1) DEFAULT '4' COMMENT '状态 4:待发货 5:已完成 6:已失效',
  31. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  32. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  33. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  34. ];
  35. $this->_readonly = ['id'];
  36. $this->_create_autofill = [
  37. 'createTime' => time()
  38. ];
  39. $this->_update_autofill = [
  40. 'updateTime' => time()
  41. ];
  42. parent::__construct($serviceDB);
  43. }
  44. }