structure.php 3.07 KB
<?php
/**
 * 应用的数据表结构文件
 * structure.php
 * $Author$
 */
return "
CREATE TABLE IF NOT EXISTS `oa_download_download` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `title` varchar(100) NOT NULL DEFAULT '' COMMENT '文件名称',
  `ea_id` char(32) NOT NULL DEFAULT '' COMMENT '管理员UID',
  `username` varchar(100) NOT NULL DEFAULT '' COMMENT '管理员名称',
  `read` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0=未读,1=已读',
  `file_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '文件生成状态:0=待生成,1=已生成',
  `size` bigint(19) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类型, 0=xls,1=zip文件,2=其他',
  `app_dir` char(64) NOT NULL DEFAULT '' COMMENT '应用目录名 APP_DIR',
  `url` varchar(255) NOT NULL DEFAULT '' COMMENT 'URL地址',
  `domain` char(32) NOT NULL DEFAULT '' COMMENT '企业域名',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
  `created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`),
  KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='下载中心列表';

CREATE TABLE  IF NOT EXISTS `oa_download_syscache` (
  `name` varchar(255) NOT NULL COMMENT '缓存文件名',
  `domain` varchar(120) NOT NULL DEFAULT '' COMMENT '企业域名',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '缓存类型, 0:非数组, 1:数组',
  `data` mediumblob NOT NULL COMMENT '数据',
  `status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '记录状态, 1初始化,2=已更新, 3=已删除',
  `created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='下载中心-缓存表';    
    
CREATE TABLE  IF NOT EXISTS `oa_download_setting` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增 ID',
  `key` varchar(255) NOT NULL DEFAULT '' COMMENT '变量名',
  `value` text NOT NULL COMMENT '值',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '缓存类型, 0:非数组, 1:数组',
  `comment` text NOT NULL COMMENT '说明',
  `domain` varchar(32) NOT NULL DEFAULT '' COMMENT '企业域名',
  `status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态, 1=初始化,2=已更新,3=已删除',
  `created` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted` bigint(13) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`),
  KEY `domain_status` (`domain`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='下载中心-设置表';

";