structure.php 4.25 KB
<?php
/**
 * 应用的数据表结构文件
 * structure.php
 * $Author$
 */

return "

DROP TABLE IF EXISTS `oa_assistant_authority`;
CREATE TABLE `oa_assistant_authority` (
  `ha_id` int(10) NOT NULL AUTO_INCREMENT,
  `am_id` int(10) NOT NULL DEFAULT '0' COMMENT '权限可见范围主表 ID',
  `authority_id` char(32) NOT NULL DEFAULT '' COMMENT '可见范围对象',
  `authority_id_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1: 人员 2: 角色 3: 岗位',
  `domain` varchar(120) NOT NULL DEFAULT '' COMMENT '企业域名',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '数据状态:1=新创建; 2=已更新; 3=已删除',
  `created` bigint(13) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated` bigint(13) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted` bigint(13) NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`ha_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='可见范围对象';


DROP TABLE IF EXISTS `oa_assistant_authority_main`;
CREATE TABLE `oa_assistant_authority_main` (
  `am_id` int(10) NOT NULL AUTO_INCREMENT,
  `ap_id` int(10) NOT NULL DEFAULT '0' COMMENT 'oa_assistant_plugin 表 ID',
  `visible_range` text NOT NULL COMMENT '可查看岗位/角色范围  ,相隔',
  `visible_range_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '可见范围类型 0: 无 1: 角色 2: 岗位',
  `domain` varchar(120) NOT NULL DEFAULT '' COMMENT '企业标识',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '数据状态:1=新创建; 2=已更新; 3=已删除',
  `created` bigint(13) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated` bigint(13) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted` bigint(13) NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`am_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='权限可见范围主表';


DROP TABLE IF EXISTS `oa_assistant_plugin`;
CREATE TABLE `oa_assistant_plugin` (
  `ap_id` int(10) NOT NULL AUTO_INCREMENT,
  `ap_key` varchar(32) DEFAULT '' COMMENT '应用key',
  `name` varchar(32) NOT NULL DEFAULT '' COMMENT '应用名称',
  `url` varchar(256) NOT NULL DEFAULT '' COMMENT '跳转地址',
  `domain` varchar(120) NOT NULL DEFAULT '' COMMENT '企业域名',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '数据状态:1=新创建; 2=已更新; 3=已删除',
  `created` bigint(13) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated` bigint(13) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted` bigint(13) NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`ap_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='应用跳转地址索引表';


DROP TABLE IF EXISTS `oa_assistant_setting`;
CREATE TABLE `oa_assistant_setting` (
  `key` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '变量名',
  `domain` varchar(120) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '企业域名',
  `value` text CHARACTER SET utf8 NOT NULL COMMENT '值',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '缓存类型:0=非数组; 1=数组',
  `comment` text CHARACTER SET utf8 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='培训 - 设置表';


DROP TABLE IF EXISTS `oa_assistant_syscache`;
CREATE TABLE `oa_assistant_syscache` (
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '缓存文件名',
  `domain` varchar(120) CHARACTER SET utf8 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;


";