<?php

namespace JinDouYun\Dao\Commission;

use JinDouYun\Dao\BaseDao;

/**
 * Description:分销商品记录表
 * Class DCommissionGoods
 */
class DCommissionGoods extends BaseDao
{
    /**
     * DCommissionGoods constructor.
     * @param string $serviceDB
     */
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'commission_goods';
        $this->_primary = 'id';
        $this->_fields = [
            "id",//int(10) NOT NULL AUTO_INCREMENT,
            "goodsId",// int(10) DEFAULT NULL COMMENT '商品id',
            "skuId",//int(10) DEFAULT NULL COMMENT 'skuId',
            "commissionRule",//json DEFAULT NULL COMMENT '商品佣金单独设置数据',
            "deleteStatus",//tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
            "extends",//json DEFAULT NULL COMMENT '拓展字段',
            "createTime",//int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
            "updateTime",//int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}