DOrderCoupon.Class.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * 订单优惠表Dao
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/10/31
  7. * Time: 15:58
  8. */
  9. namespace JinDouYun\Dao\Order;
  10. use JinDouYun\Dao\BaseDao;
  11. class DOrderCoupon extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'order_coupon';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id",//int(10) NOT NULL AUTO_INCREMENT,
  19. "orderId",//int(10) NOT NULL DEFAULT '0' COMMENT '订单Id',
  20. "goodsId",//int(10) NOT NULL DEFAULT '0' COMMENT '商品id',
  21. "shopId",// int(10) NOT NULL DEFAULT '0' COMMENT '店铺id',
  22. "couponAmount",//decimal(12,2) default '0.00' COMMENT '商品优惠金额',
  23. "couponInfo",//json DEFAULT NULL COMMENT '优惠信息',
  24. "extends",//json DEFAULT NULL COMMENT '拓展字段',
  25. "createTime",//int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  26. "updateTime",//int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  27. ];
  28. $this->_readonly = ['id'];
  29. $this->_create_autofill = [
  30. 'createTime' => time()
  31. ];
  32. $this->_update_autofill = [
  33. 'updateTime' => time()
  34. ];
  35. parent::__construct($serviceDB);
  36. }
  37. }