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

namespace JinDouYun\Dao\Finance;

use JinDouYun\Dao\BaseDao;

class DReceiveReceiptIndex extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'qianniao_receive_receipt_index_1';
        $this->_primary = 'id';
        $this->_fields = [
            'id',//int(11) NOT NULL AUTO_INCREMENT COMMENT '应收索引表id',
              'receiveReceiptId',//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 NOT NULL DEFAULT '4' COMMENT '核销状态  5全部核销/4部分核销',
              'auditStatus',//tinyint(1) DEFAULT '1' COMMENT '审核状态（2已审核 1待审核）',
              'customerId',//int(11) DEFAULT NULL COMMENT '客户id',
              'sourceNo',//char(25) DEFAULT NULL COMMENT '原单据编号',
              'sourceId',//int(11) DEFAULT NULL COMMENT '原单据id',
              'originId',//int(10) DEFAULT '0' COMMENT '订单id',
              'originNo',//char(50) DEFAULT NULL COMMENT '订单no',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}