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

namespace JinDouYun\Dao\Finance;

use JinDouYun\Dao\BaseDao;

class DPayReceiptIndex extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'qianniao_pay_receipt_index_1';
        $this->_primary = 'id';
        $this->_fields = [
            'id',//int(11) NOT NULL AUTO_INCREMENT COMMENT '应收索引表id',
            'payReceiptId',//int(11) NOT NULL COMMENT '应付单据id',
            'createTime',//int(11) NOT NULL COMMENT '创建时间',
            'updateTime',//int(11) NOT NULL COMMENT '修改时间',
            'shopId',//int(11) DEFAULT NULL COMMENT '商铺id',
            'financeTypeId',//tinyint(2) DEFAULT NULL COMMENT '财务类型id',
            'financeType',//varchar(50) DEFAULT NULL COMMENT '财务类型名称',
            'offsetStatus',// tinyint(1) unsigned DEFAULT NULL COMMENT '核销状态 5全部核销/4部分核销',
            'auditStatus',//tinyint(1) DEFAULT '1' COMMENT '应付单据状态（1未审核 2已审核）',
            'supplierId',//int(11) DEFAULT NULL COMMENT '供应商id',
            'sourceNo',//char(25) DEFAULT NULL COMMENT '源订单号',
            'deleteStatus'
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}