1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /**
- * 积分规则Dao
- * Created by PhpStorm.
- * User: haoren
- * Date: 2021/03/25
- * Time: 15:00
- */
- namespace JinDouYun\Dao\Integral;
- use JinDouYun\Dao\BaseDao;
- class DIntegralRule extends BaseDao
- {
- public function __construct($serviceDB = 'default')
- {
- $this->_table = 'integral_rule';
- $this->_primary = 'id';
- $this->_fields = [
- "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键id',
- "title", //varchar(255) DEFAULT NULL COMMENT '规则名',
- "shopId", //int(10) DEFAULT '0' COMMENT '商铺id',
- "amount", //decimal(10,2) DEFAULT '0.00' COMMENT '每满足金额',
- "integral", //decimal(10,2) DEFAULT '0.00' COMMENT '奖励积分',
- "goods", //json DEFAULT NULL COMMENT '商品数据',
- "integralTotal", //decimal(10,2) DEFAULT '0.00' COMMENT '累计发放积分',
- "enableStatus", //tinyint(1) DEFAULT '5' COMMENT '启用状态 4:失效 5:正常',
- "deleteStatus", //tinyint(1) DEFAULT NULL COMMENT '删除状态 4:删除 5:正常',
- "createTime", //int(11) DEFAULT NULL COMMENT '创建时间',
- "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
- "extend", //json DEFAULT NULL COMMENT '扩展字段',
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time()
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|