12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- /**
- * Created by PhpStorm.
- * User: XiaoMing
- * Date: 2019/12/16
- * Time: 15:41
- */
- namespace Jobs\Dao;
- class DUserCoupon extends BaseDao
- {
- public function __construct($serviceDB = 'default')
- {
- $this->_table = 'user_coupon';
- $this->_primary = 'id';
- $this->_fields = [
- "id",//int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
- "couponId",//int(11) unsigned NOT NULL COMMENT '优惠券id',
- "name",//varchar(255) NOT NULL DEFAULT '' COMMENT '优惠券名称',
- "remark",//varchar(255) NOT NULL DEFAULT '' COMMENT '使用说明',
- "couponType",//tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '优惠券类型(10满减券)',
- "reducePrice",//decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '满减券-减免金额(面值)',
- "minPrice",//decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最低消费金额 0.00不限金额',
- "startTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效期开始时间',
- "endTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效期结束时间',
- "applyRange",//tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '适用范围(10全部商品 20指定分类 30指定品牌)',
- "categoryCollect",//varchar(255) NOT NULL DEFAULT '' COMMENT '(20指定分类)-分类集合',
- "brandCollect",//varchar(255) NOT NULL DEFAULT '' COMMENT '(30指定品牌)-品牌集合',
- "goodsCollect",
- "isExpire",//tinyint(3) unsigned NOT NULL DEFAULT '4' COMMENT '是否过期(4未过期 5已过期)',
- "isUse",//tinyint(3) unsigned NOT NULL DEFAULT '4' COMMENT '是否已使用(4未使用 5已使用)',
- "useTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '使用时间',
- "userId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
- "customerId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '客户id',
- "shopId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '领取的店铺id',
- "useShop",//varchar(255) NOT NULL DEFAULT '' COMMENT '使用范围 为空时所有店铺都能使用',
- "source",//tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '优惠券来源(10主动领取 20定向发放 30注册领取 40在线支付赠送)',
- "createTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
- "updateTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
- "orderNo",//char(21) NOT NULL DEFAULT '' COMMENT '使用单号',
- "orderId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
- "extends",//json DEFAULT NULL COMMENT '拓展字段',
- "customerIds",//varchar(255) NOT NULL DEFAULT '' COMMENT '领取客户 为空时所有客户都能领取',
- "isMutex",//tinyint(3) unsigned NOT NULL DEFAULT '5' COMMENT '是否互斥(5是 4否)',
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time()
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|