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

namespace JinDouYun\Dao\Finance;

use JinDouYun\Dao\BaseDao;

class DReceiptRequisitionAccount extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'qianniao_receipt_requisition_account_1';
        $this->_primary = 'id';
        $this->_fields = [
            'id',//int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
            'receiptRequisitionId',//int(10) unsigned NOT NULL COMMENT '收款单id',
            'collectionAmount',//decimal(15,4) NOT NULL COMMENT '收款金额',
            'preferentialAmount',//decimal(15,4) NOT NULL COMMENT '优惠金额',
            'actualAmount',//decimal(15,4) NOT NULL COMMENT '实际金额',
            'settlementMethod',//tinyint(10) NOT NULL COMMENT '付款方式',
            'accountId',// int(10) DEFAULT NULL COMMENT '账户id',
            'accountName',// char(50) DEFAULT NULL COMMENT '账户名称',
            'remark',//varchar(255) DEFAULT NULL COMMENT '备注',
            'deleteStatus',// int(10) unsigned NOT NULL DEFAULT '5' COMMENT '删除状态',
            '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);
    }
}