123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- /**
- * 优惠券记录
- * Created by PhpStorm.
- * User: XiaoMing
- * Date: 2019/12/13
- * Time: 16:05
- */
- namespace JinDouYun\Dao\Market;
- use JinDouYun\Dao\BaseDao;
- 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 '更新时间',
- "orderData" ,//json DEFAULT NULL COMMENT '订单数据',
- "extends",//json DEFAULT NULL COMMENT '拓展字段',
- "vipCardId",// int(11) DEFAULT '0' COMMENT '绑定的会员卡Id',
- "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);
- }
- }
|