<?php
/**
 * Created by PhpStorm.
 * User: Gss
 * Date: 2021/3/11 0011
 * Time: 17:25
 */

namespace JinDouYun\Dao\Finance;

use JinDouYun\Dao\BaseDao;

class DReceiveOffset extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'qianniao_receive_offset_1';
        $this->_primary = 'id';
        $this->_fields = [
            'id',//int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
              'receiveReceiptId',//int(10) unsigned DEFAULT NULL COMMENT '应收单id',
              'receivedId',//int(10) unsigned DEFAULT NULL COMMENT '收款单id',
              'offsetMoney',//decimal(15,4) DEFAULT '0.0000' COMMENT '核销金额',
              'createTime',//int(10) DEFAULT NULL COMMENT '创建时间',
              'updateTime',//int(10) DEFAULT NULL COMMENT '更新时间',
              'extends',//json DEFAULT NULL COMMENT '扩展字段',
            'receiveCreateTime',//应收创建时间
            'type',// tinyint(1) DEFAULT '5' COMMENT '创建来源  5收款、4应收',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}