1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- /**
- * 积分商品Dao
- * Created by PhpStorm.
- * User: haoren
- * Date: 2021/03/25
- * Time: 15:00
- */
- namespace JinDouYun\Dao\Integral;
- use JinDouYun\Dao\BaseDao;
- class DIntegralGoods extends BaseDao
- {
- public function __construct($serviceDB = 'default')
- {
- $this->_table = 'integral_goods';
- $this->_primary = 'id';
- $this->_fields = [
- "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
- "shopId", //int(10) DEFAULT '0' COMMENT '商铺id',
- "name", //varchar(255) DEFAULT NULL COMMENT '商品名称',
- "images", //json DEFAULT NULL COMMENT '商品图片',
- "integral", //decimal(10,2) DEFAULT NULL COMMENT '积分价格',
- "sort", //int(10) DEFAULT '0' COMMENT '排序 从大到小',
- "limit", //int(10) DEFAULT '0' COMMENT '每人限购',
- "num", //int(10) DEFAULT '0' COMMENT '剩余数量',
- "changeNum", //int(10) DEFAULT '0' COMMENT '兑换数量',
- "desc", //text COMMENT '详情',
- "enableStatus", //tinyint(1) DEFAULT '5' COMMENT '启用状态 4:禁用 5:启用',
- "deleteStatus", //tinyint(1) DEFAULT '5' COMMENT '删除状态 4:删除 5:正常',
- "createTime", //int(10) 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);
- }
- }
|