<?php
/**
 * Created by PhpStorm.
 * User: wxj
 * Date: 2019/10/30
 * Time: 14:17
 */

namespace JinDouYun\Dao\Finance;

use JinDouYun\Dao\BaseDao;

class DAccountTransfer extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'qianniao_account_transfer_1';
        $this->_primary = 'id';
        $this->_fields = [
            'id',//int(11) NOT NULL AUTO_INCREMENT COMMENT '资金转账单Id',
            'no',//char(25) DEFAULT NULL COMMENT '单据编号',
            'totalMoney',//decimal(15,4) DEFAULT NULL COMMENT '合计金额',
            'operatorId',//int(11) DEFAULT NULL COMMENT '操作人员Id',
            'operatorName',//varchar(50) DEFAULT NULL COMMENT '操作人员',
            'shopId',//int(11) DEFAULT NULL COMMENT '商铺Id',
            'records',//json DEFAULT NULL COMMENT '账户记录',
            'createTime',//int(11) DEFAULT NULL COMMENT '创建时间',
            'updateTime',//int(11) DEFAULT NULL COMMENT '修改时间',
            'extends',//json DEFAULT NULL COMMENT '扩展字段',
            'auditStatus',//tinyint(1) DEFAULT NULL COMMENT '审核状态',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}