<?php
/**
 * Created by PhpStorm.
 * User: Gss
 * Date: 2021/4/6 0006
 * Time: 14:11
 */

namespace JinDouYun\Dao\Merchant;

use JinDouYun\Dao\BaseDao;


class DMerchantSettlement extends BaseDao
{
    public function __construct($serviceDB = 'finance')
    {
        $this->_table = 'qianniao_merchant_settlement_1';
        $this->_primary = 'id';
        $this->_fields = [
                'id',//int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '收支表id',
                'orderNo',//char(50) NOT NULL COMMENT '订单编号',
                'orderId',//int(10) NOT NULL COMMENT '订单id',
                'goodId',//char(50) NOT NULL COMMENT '商品id',
                'goodName',//char(50) NOT NULL COMMENT '商品名称',
                'goodPrice',//decimal(12,2) DEFAULT '0.00' COMMENT '商品单价',
                'goodMoney',//decimal(12,2) DEFAULT '0.00' COMMENT '商品金额',
                'MerchantId',//int(10) DEFAULT NULL COMMENT '商户id',
                'MerchantName',//varchar(255) DEFAULT NULL COMMENT '商户名称',
                'settlementStatus',//tinyint(1) NOT NULL DEFAULT '4' COMMENT '结算状态',
                'createTime',//int(10) NOT NULL COMMENT '创建时间',
                'outStockTime',//int(10) DEFAULT NULL COMMENT '出库时间',
                'finishTime',//int(10) DEFAULT NULL COMMENT '完结时间',
                "updateTime",//int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
                "extends",//json DEFAULT NULL COMMENT '拓展字段',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}