<?php


namespace JinDouYun\Dao\System;

use JinDouYun\Dao\BaseDao;

/**
 * Class DAppVersion
 * @package JinDouYun\Dao\System
 */
class DAppVersion extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'app_version';
        $this->_primary = 'id';
        $this->_fields = [
            "id",//int(10) NOT NULL AUTO_INCREMENT,
            "enterpriseId",//int(10) DEFAULT NULL COMMENT '企业id',
            "appVersion",//varchar(50) DEFAULT '' COMMENT '安卓应用版本',
            "downloadUrl",//varchar(255) DEFAULT '' 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);
    }
}