-- select username,sid,serial# from v$session;
-- alter system kill session '532,4562';  
-- drop user gk cascade;
-- create user gk IDENTIFIED by gk;
-- grant connect,dba to gk;
--表如下：
--GK_BASIC_JSJY_USER
--GK_OPERATION_JSJY_BIZ_LOG
--GK_OPERATION_JSJY_CODE
--GK_OPERATION_JSJY_FUNC
--GK_OPERATION_JSJY_JOBINFO
--GK_OPERATION_JSJY_MENU
--GK_OPERATION_JSJY_ORG
--GK_OPERATION_JSJY_ORG_FUNC
--GK_OPERATION_JSJY_ORG_MENU
--GK_OPERATION_JSJY_ROLE
--GK_OPERATION_JSJY_ROLE_FUNC
--GK_OPERATION_JSJY_ROLE_MENU
--GK_OPERATION_JSJY_ROLE_USER
--GK_OPERATION_JSJY_SYS_PARAM
--GK_OPERATION_JSJY_USER_FUNC
--GK_OPERATION_JSJY_USER_MENU
--GK_OPERATION_JSJY_TASK
--GK_BASIC_JSJY_FJB
--共18张表

--用户表
create table GK_BASIC_JSJY_USER
(
  id               VARCHAR2(40) not null,
  name             NVARCHAR2(100),
  uname            VARCHAR2(100) not null,
  ssglbm           VARCHAR2(40),
  password         VARCHAR2(100),
  sortno           INTEGER,
  weixinid         VARCHAR2(100),
  create_date_time TIMESTAMP(0) default current_timestamp not null,
  update_date_time TIMESTAMP(0) default current_timestamp not null,
  record_status    INTEGER default 1 not null,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  szd              VARCHAR2(40),
  ssglry           VARCHAR2(40),
  ssjyr            VARCHAR2(40),
  sfjyr            VARCHAR2(40)
)TABLESPACE "GK_BASIC";
;
comment on table GK_BASIC_JSJY_USER
  is '用户表';
comment on column GK_BASIC_JSJY_USER.id
  is '唯一标识';
comment on column GK_BASIC_JSJY_USER.name
  is '姓名';
comment on column GK_BASIC_JSJY_USER.uname
  is '登录账号';
comment on column GK_BASIC_JSJY_USER.ssglbm
  is '所属管理部门';
comment on column GK_BASIC_JSJY_USER.password
  is '登录密码';
comment on column GK_BASIC_JSJY_USER.sortno
  is '排序号';
comment on column GK_BASIC_JSJY_USER.weixinid
  is '微信ID';
comment on column GK_BASIC_JSJY_USER.create_date_time
  is '创建时间';
comment on column GK_BASIC_JSJY_USER.update_date_time
  is '修改时间';
comment on column GK_BASIC_JSJY_USER.record_status
  is '数据状态';
comment on column GK_BASIC_JSJY_USER.create_user
  is '创建人';
comment on column GK_BASIC_JSJY_USER.update_user
  is '修改人';
comment on column GK_BASIC_JSJY_USER.szd
  is '所在地';
comment on column GK_BASIC_JSJY_USER.ssglry
  is '所属管理人员';
comment on column GK_BASIC_JSJY_USER.ssjyr
  is '所属经营人';
comment on column GK_BASIC_JSJY_USER.sfjyr
  is '是否经营人';
alter table GK_BASIC_JSJY_USER
  add primary key (ID);

 --日志表
create table GK_OPERATION_JSJY_BIZ_LOG
(
  id               VARCHAR2(40) not null,
  userid           VARCHAR2(40),
  log_type         VARCHAR2(100),
  cost             NUMBER,
  method           VARCHAR2(250),
  url              VARCHAR2(200),
  ip               VARCHAR2(25),
  handler_type     VARCHAR2(20),
  param            VARCHAR2(1000),
  browser          VARCHAR2(50),
  os               VARCHAR2(50),
  remark           VARCHAR2(250),
  insert_time      TIMESTAMP(6),
  create_date_time TIMESTAMP(0) default current_timestamp not null,
  update_date_time TIMESTAMP(0) default current_timestamp not null,
  record_status    INTEGER default 1 not null,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  szd              VARCHAR2(40)
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_BIZ_LOG
  is '业务操作日志表';
comment on column GK_OPERATION_JSJY_BIZ_LOG.id
  is '唯一标识';
comment on column GK_OPERATION_JSJY_BIZ_LOG.userid
  is '操作人ID';
comment on column GK_OPERATION_JSJY_BIZ_LOG.log_type
  is '日志类型';
comment on column GK_OPERATION_JSJY_BIZ_LOG.cost
  is '记录状态';
comment on column GK_OPERATION_JSJY_BIZ_LOG.method
  is '操作方法';
comment on column GK_OPERATION_JSJY_BIZ_LOG.url
  is '请求URL';
comment on column GK_OPERATION_JSJY_BIZ_LOG.ip
  is '客户端IP';
comment on column GK_OPERATION_JSJY_BIZ_LOG.handler_type
  is '访问类型';
comment on column GK_OPERATION_JSJY_BIZ_LOG.param
  is '请求参数';
comment on column GK_OPERATION_JSJY_BIZ_LOG.browser
  is '浏览器版本';
comment on column GK_OPERATION_JSJY_BIZ_LOG.os
  is '操作系统版本';
comment on column GK_OPERATION_JSJY_BIZ_LOG.remark
  is '备注';
comment on column GK_OPERATION_JSJY_BIZ_LOG.insert_time
  is '记录时间';
comment on column GK_OPERATION_JSJY_BIZ_LOG.create_date_time
  is '创建时间';
comment on column GK_OPERATION_JSJY_BIZ_LOG.update_date_time
  is '修改时间';
comment on column GK_OPERATION_JSJY_BIZ_LOG.record_status
  is '数据状态';
comment on column GK_OPERATION_JSJY_BIZ_LOG.create_user
  is '创建人';
comment on column GK_OPERATION_JSJY_BIZ_LOG.update_user
  is '修改人';
comment on column GK_OPERATION_JSJY_BIZ_LOG.szd
  is '所在地';
alter table GK_OPERATION_JSJY_BIZ_LOG
  add primary key (ID);

 --字典表
create table GK_OPERATION_JSJY_CODE
(
  id               VARCHAR2(40) not null,
  pid              VARCHAR2(40),
  text             NVARCHAR2(100),
  code             VARCHAR2(100),
  val              VARCHAR2(100),
  sortno           INTEGER,
  create_date_time TIMESTAMP(0) default current_timestamp not null,
  update_date_time TIMESTAMP(0) default current_timestamp not null,
  record_status    INTEGER default 1 not null,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  szd              VARCHAR2(40),
  group_code       VARCHAR2(100),
  bz               NVARCHAR2(100),
  YJPTID           VARCHAR2(40)
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_CODE
  is '字典表';
comment on column GK_OPERATION_JSJY_CODE.id
  is '唯一标识';
comment on column GK_OPERATION_JSJY_CODE.pid
  is '上级ID';
comment on column GK_OPERATION_JSJY_CODE.text
  is '名称';
comment on column GK_OPERATION_JSJY_CODE.code
  is '编码';
comment on column GK_OPERATION_JSJY_CODE.val
  is '编码值';
comment on column GK_OPERATION_JSJY_CODE.sortno
  is '排序号';
comment on column GK_OPERATION_JSJY_CODE.create_date_time
  is '创建时间';
comment on column GK_OPERATION_JSJY_CODE.update_date_time
  is '修改时间';
comment on column GK_OPERATION_JSJY_CODE.record_status
  is '数据状态';
comment on column GK_OPERATION_JSJY_CODE.create_user
  is '创建人';
comment on column GK_OPERATION_JSJY_CODE.update_user
  is '修改人';
comment on column GK_OPERATION_JSJY_CODE.szd
  is '所在地';
comment on column GK_OPERATION_JSJY_CODE.group_code
  is '组code';
  comment on column GK_OPERATION_JSJY_CODE.bz
  is '备注';
alter table GK_OPERATION_JSJY_CODE
  add primary key (ID);
  
  --按钮表
create table GK_OPERATION_JSJY_FUNC
(
  id               VARCHAR2(40) not null,
  name             NVARCHAR2(100),
  code             VARCHAR2(40),
  mid              VARCHAR2(40),
  sortno           INTEGER,
  create_date_time TIMESTAMP(0) default current_timestamp not null,
  update_date_time TIMESTAMP(0) default current_timestamp not null,
  record_status    INTEGER default 1 not null,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  szd              VARCHAR2(40)
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_FUNC
  is '功能表';
comment on column GK_OPERATION_JSJY_FUNC.id
  is '唯一标识';
comment on column GK_OPERATION_JSJY_FUNC.name
  is '功能名称';
comment on column GK_OPERATION_JSJY_FUNC.code
  is '功能编码';
comment on column GK_OPERATION_JSJY_FUNC.mid
  is '所属菜单';
comment on column GK_OPERATION_JSJY_FUNC.sortno
  is '排序号';
comment on column GK_OPERATION_JSJY_FUNC.create_date_time
  is '创建时间';
comment on column GK_OPERATION_JSJY_FUNC.update_date_time
  is '修改时间';
comment on column GK_OPERATION_JSJY_FUNC.record_status
  is '数据状态';
comment on column GK_OPERATION_JSJY_FUNC.create_user
  is '创建人';
comment on column GK_OPERATION_JSJY_FUNC.update_user
  is '修改人';
comment on column GK_OPERATION_JSJY_FUNC.szd
  is '所在地';
alter table GK_OPERATION_JSJY_FUNC
  add primary key (ID);
  
  --定时任务表
create table GK_OPERATION_JSJY_JOBINFO
(
  id               VARCHAR2(40) not null,
  disp             VARCHAR2(100),
  create_time      DATE default current_timestamp,
  start_time       DATE,
  end_time         DATE,
  circle           CHAR(1),
  result           VARCHAR2(100),
  interval         NUMBER,
  status           VARCHAR2(100),
  param            VARCHAR2(100),
  clazz            VARCHAR2(100),
  cron_expression  VARCHAR2(100),
  create_date_time TIMESTAMP(0) default current_timestamp not null,
  update_date_time TIMESTAMP(0) default current_timestamp not null,
  record_status    INTEGER default 1 not null,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  szd              VARCHAR2(40)
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_JOBINFO
  is '任务信息表';
comment on column GK_OPERATION_JSJY_JOBINFO.id
  is '唯一标识';
comment on column GK_OPERATION_JSJY_JOBINFO.disp
  is '任务描述';
comment on column GK_OPERATION_JSJY_JOBINFO.create_time
  is '任务创建时间';
comment on column GK_OPERATION_JSJY_JOBINFO.start_time
  is '任务启动时间';
comment on column GK_OPERATION_JSJY_JOBINFO.end_time
  is '任务结束时间';
comment on column GK_OPERATION_JSJY_JOBINFO.circle
  is '是否循环';
comment on column GK_OPERATION_JSJY_JOBINFO.result
  is '上次执行结果';
comment on column GK_OPERATION_JSJY_JOBINFO.interval
  is '间隔时间';
comment on column GK_OPERATION_JSJY_JOBINFO.status
  is '任务状态';
comment on column GK_OPERATION_JSJY_JOBINFO.param
  is '执行参数';
comment on column GK_OPERATION_JSJY_JOBINFO.create_date_time
  is '创建时间';
comment on column GK_OPERATION_JSJY_JOBINFO.update_date_time
  is '修改时间';
comment on column GK_OPERATION_JSJY_JOBINFO.record_status
  is '数据状态';
comment on column GK_OPERATION_JSJY_JOBINFO.create_user
  is '创建人';
comment on column GK_OPERATION_JSJY_JOBINFO.update_user
  is '修改人';
comment on column GK_OPERATION_JSJY_JOBINFO.szd
  is '所在地';
alter table GK_OPERATION_JSJY_JOBINFO
  add primary key (ID);

 --菜单表
create table GK_OPERATION_JSJY_MENU
(
  id               VARCHAR2(40) not null,
  pid              VARCHAR2(40),
  name             NVARCHAR2(100),
  code             VARCHAR2(40),
  url              VARCHAR2(150),
  sortno           INTEGER,
  create_date_time TIMESTAMP(0) default current_timestamp not null,
  update_date_time TIMESTAMP(0) default current_timestamp not null,
  record_status    INTEGER default 1 not null,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  szd              VARCHAR2(40),
  iconcls          VARCHAR2(40),
  leaf             VARCHAR2(10)
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_MENU
  is '菜单表';
comment on column GK_OPERATION_JSJY_MENU.id
  is '唯一标识';
comment on column GK_OPERATION_JSJY_MENU.pid
  is '上级菜单';
comment on column GK_OPERATION_JSJY_MENU.name
  is '菜单名称';
comment on column GK_OPERATION_JSJY_MENU.code
  is '菜单编码';
comment on column GK_OPERATION_JSJY_MENU.url
  is '菜单路径';
comment on column GK_OPERATION_JSJY_MENU.sortno
  is '排序号';
comment on column GK_OPERATION_JSJY_MENU.create_date_time
  is '创建时间';
comment on column GK_OPERATION_JSJY_MENU.update_date_time
  is '修改时间';
comment on column GK_OPERATION_JSJY_MENU.record_status
  is '数据状态';
comment on column GK_OPERATION_JSJY_MENU.create_user
  is '创建人';
comment on column GK_OPERATION_JSJY_MENU.update_user
  is '修改人';
comment on column GK_OPERATION_JSJY_MENU.szd
  is '所在地';
alter table GK_OPERATION_JSJY_MENU
  add primary key (ID);

 --组织表
create table GK_OPERATION_JSJY_ORG
(
  id               VARCHAR2(40) not null,
  pid              VARCHAR2(40),
  name             VARCHAR2(100),
  code             VARCHAR2(100),
  sortno           INTEGER,
  remark           VARCHAR2(255),
  create_date_time TIMESTAMP(0) default current_timestamp not null,
  update_date_time TIMESTAMP(0) default current_timestamp not null,
  record_status    INTEGER default 1 not null,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  szd              VARCHAR2(40)
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_ORG
  is '组织表';
comment on column GK_OPERATION_JSJY_ORG.id
  is '唯一标识';
comment on column GK_OPERATION_JSJY_ORG.pid
  is '上级组织ID';
comment on column GK_OPERATION_JSJY_ORG.name
  is '名称';
comment on column GK_OPERATION_JSJY_ORG.code
  is '编码';
comment on column GK_OPERATION_JSJY_ORG.sortno
  is '排序号';
comment on column GK_OPERATION_JSJY_ORG.create_date_time
  is '创建时间';
comment on column GK_OPERATION_JSJY_ORG.update_date_time
  is '修改时间';
comment on column GK_OPERATION_JSJY_ORG.record_status
  is '数据状态';
comment on column GK_OPERATION_JSJY_ORG.create_user
  is '创建人';
comment on column GK_OPERATION_JSJY_ORG.update_user
  is '修改人';
comment on column GK_OPERATION_JSJY_ORG.szd
  is '所在地';
alter table GK_OPERATION_JSJY_ORG
  add primary key (ID);

 --组织按钮表
create table GK_OPERATION_JSJY_ORG_FUNC
(
  orgid VARCHAR2(40) not null,
  fid   VARCHAR2(100) not null
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_ORG_FUNC
  is '组织功能授权表';
comment on column GK_OPERATION_JSJY_ORG_FUNC.orgid
  is '组织ID';
comment on column GK_OPERATION_JSJY_ORG_FUNC.fid
  is '功能ID';
alter table GK_OPERATION_JSJY_ORG_FUNC
  add primary key (ORGID, FID);

 --组织菜单表
create table GK_OPERATION_JSJY_ORG_MENU
(
  orgid VARCHAR2(40) not null,
  mid   VARCHAR2(100) not null
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_ORG_MENU
  is ' 组织菜单授权表';
comment on column GK_OPERATION_JSJY_ORG_MENU.orgid
  is '组织ID';
comment on column GK_OPERATION_JSJY_ORG_MENU.mid
  is '菜单ID';
alter table GK_OPERATION_JSJY_ORG_MENU
  add primary key (ORGID, MID);

 --角色表
create table GK_OPERATION_JSJY_ROLE
(
  id               VARCHAR2(40) not null,
  orgid            VARCHAR2(40),
  name             VARCHAR2(100),
  code             VARCHAR2(100),
  sortno           INTEGER,
  create_date_time TIMESTAMP(0) default current_timestamp,
  update_date_time TIMESTAMP(0) default current_timestamp,
  record_status    INTEGER default 1,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  szd              VARCHAR2(40)
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_ROLE
  is '角色表';
comment on column GK_OPERATION_JSJY_ROLE.id
  is '唯一标识';
comment on column GK_OPERATION_JSJY_ROLE.orgid
  is '所在组织ID';
comment on column GK_OPERATION_JSJY_ROLE.name
  is '名称';
comment on column GK_OPERATION_JSJY_ROLE.code
  is '编码';
comment on column GK_OPERATION_JSJY_ROLE.sortno
  is '排序号';
comment on column GK_OPERATION_JSJY_ROLE.create_date_time
  is '创建时间';
comment on column GK_OPERATION_JSJY_ROLE.update_date_time
  is '修改时间';
comment on column GK_OPERATION_JSJY_ROLE.record_status
  is '数据状态';
comment on column GK_OPERATION_JSJY_ROLE.create_user
  is '创建人';
comment on column GK_OPERATION_JSJY_ROLE.update_user
  is '修改人';
comment on column GK_OPERATION_JSJY_ROLE.szd
  is '所在地';
alter table GK_OPERATION_JSJY_ROLE
  add primary key (ID);

 --角色按钮表
create table GK_OPERATION_JSJY_ROLE_FUNC
(
  rid VARCHAR2(40) not null,
  fid VARCHAR2(100) not null
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_ROLE_FUNC
  is '角色功能授权表';
comment on column GK_OPERATION_JSJY_ROLE_FUNC.rid
  is '角色ID';
comment on column GK_OPERATION_JSJY_ROLE_FUNC.fid
  is '功能ID';
alter table GK_OPERATION_JSJY_ROLE_FUNC
  add primary key (RID, FID);

 --角色菜单表
create table GK_OPERATION_JSJY_ROLE_MENU
(
  rid VARCHAR2(40) not null,
  mid VARCHAR2(100) not null
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_ROLE_MENU
  is ' 角色菜单授权表';
comment on column GK_OPERATION_JSJY_ROLE_MENU.rid
  is '角色ID';
comment on column GK_OPERATION_JSJY_ROLE_MENU.mid
  is '菜单ID';
alter table GK_OPERATION_JSJY_ROLE_MENU
  add primary key (RID, MID);

 --角色用户表
create table GK_OPERATION_JSJY_ROLE_USER
(
  rid    VARCHAR2(40) not null,
  userid VARCHAR2(40) not null
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_ROLE_USER
  is '角色用户关联表';
comment on column GK_OPERATION_JSJY_ROLE_USER.rid
  is '角色ID';
comment on column GK_OPERATION_JSJY_ROLE_USER.userid
  is '用户ID';
alter table GK_OPERATION_JSJY_ROLE_USER
  add primary key (RID, USERID);

 --系统参数表
create table GK_OPERATION_JSJY_SYS_PARAM
(
  id               VARCHAR2(40) not null,
  key              VARCHAR2(100),
  value            VARCHAR2(100) not null,
  clazz            VARCHAR2(40),
  disp             VARCHAR2(200),
  valid            CHAR(1),
  create_date_time TIMESTAMP(0) default current_timestamp not null,
  update_date_time TIMESTAMP(0) default current_timestamp not null,
  record_status    INTEGER default 1 not null,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  szd              VARCHAR2(40)
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_SYS_PARAM
  is '系统参数表';
comment on column GK_OPERATION_JSJY_SYS_PARAM.id
  is '唯一标识';
comment on column GK_OPERATION_JSJY_SYS_PARAM.key
  is '参数主键';
comment on column GK_OPERATION_JSJY_SYS_PARAM.value
  is '参数值';
comment on column GK_OPERATION_JSJY_SYS_PARAM.clazz
  is '所属类';
comment on column GK_OPERATION_JSJY_SYS_PARAM.disp
  is '属性描述';
comment on column GK_OPERATION_JSJY_SYS_PARAM.valid
  is '是否有效';
comment on column GK_OPERATION_JSJY_SYS_PARAM.create_date_time
  is '创建时间';
comment on column GK_OPERATION_JSJY_SYS_PARAM.update_date_time
  is '修改时间';
comment on column GK_OPERATION_JSJY_SYS_PARAM.record_status
  is '数据状态';
comment on column GK_OPERATION_JSJY_SYS_PARAM.create_user
  is '创建人';
comment on column GK_OPERATION_JSJY_SYS_PARAM.update_user
  is '修改人';
comment on column GK_OPERATION_JSJY_SYS_PARAM.szd
  is '所在地';
alter table GK_OPERATION_JSJY_SYS_PARAM
  add primary key (ID);

 --用户按钮表
create table GK_OPERATION_JSJY_USER_FUNC
(
  userid VARCHAR2(40) not null,
  fid    VARCHAR2(100) not null
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_USER_FUNC
  is '用户功能授权表';
comment on column GK_OPERATION_JSJY_USER_FUNC.userid
  is '用户ID';
comment on column GK_OPERATION_JSJY_USER_FUNC.fid
  is '功能ID';
alter table GK_OPERATION_JSJY_USER_FUNC
  add primary key (USERID, FID);

 --用户菜单表
create table GK_OPERATION_JSJY_USER_MENU
(
  userid VARCHAR2(40) not null,
  mid    VARCHAR2(100) not null
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_USER_MENU
  is ' 用户菜单授权表';
comment on column GK_OPERATION_JSJY_USER_MENU.userid
  is '用户ID';
comment on column GK_OPERATION_JSJY_USER_MENU.mid
  is '菜单ID';
alter table GK_OPERATION_JSJY_USER_MENU
  add primary key (USERID, MID);
--任务表
  create table GK_OPERATION_JSJY_TASK
(
  id               VARCHAR2(40) not null,
  task_id          VARCHAR2(100),
  bus_id           VARCHAR2(100),
  step             VARCHAR2(10),
  state            VARCHAR2(1),
  start_time       TIMESTAMP(6),
  start_user       VARCHAR2(40),
  curr_name        VARCHAR2(100),
  runner           VARCHAR2(100),
  run_time         TIMESTAMP(6),
  audit_time       TIMESTAMP(6),
  audit_msg        VARCHAR2(2000),
  audit_result     VARCHAR2(100),
  create_user      NVARCHAR2(40),
  create_date_time TIMESTAMP(6),
  update_user      NVARCHAR2(40),
  record_status    NUMBER,
  update_date_time TIMESTAMP(6),
  szd              NVARCHAR2(40),
  start_user_name  NVARCHAR2(40),
  audit_dept        NVARCHAR2(40),
  bus_key          VARCHAR2(100),
  audit_user       VARCHAR2(100),
  task_key         VARCHAR2(100),
  role_code        VARCHAR2(60),
  audit_username   VARCHAR2(100)
)TABLESPACE "GK_OPERATION"
;
comment on table GK_OPERATION_JSJY_TASK
  is '工作信息表';
alter table GK_OPERATION_JSJY_TASK
  add constraint GK_OPERATION_JSJY_TASK primary key (ID);
 --附件表 
  create table GK_BASIC_JSJY_FJB
(
  id               VARCHAR2(40) not null,
  wjm              VARCHAR2(400),
  wjhzm            VARCHAR2(400),
  bz               VARCHAR2(1000),
  wjnr             VARCHAR2(40),
  wjdx             NUMBER,
  ssid             VARCHAR2(40),
  sstype           VARCHAR2(40),
  create_date_time TIMESTAMP(6) default CURRENT_TIMESTAMP,
  create_user      VARCHAR2(40),
  update_user      VARCHAR2(40),
  record_status    INTEGER,
  update_date_time TIMESTAMP(6),
  szd              VARCHAR2(40),
  filename         VARCHAR2(20),
  filepath         NVARCHAR2(100),
  fjbz          VARCHAR2(40)
)TABLESPACE "GK_BASIC"
;
comment on table GK_BASIC_JSJY_FJB
  is '附件表';
comment on column GK_BASIC_JSJY_FJB.id
  is 'ID';
comment on column GK_BASIC_JSJY_FJB.wjm
  is '文件名';
comment on column GK_BASIC_JSJY_FJB.wjhzm
  is '文件后缀名';
comment on column GK_BASIC_JSJY_FJB.bz
  is '备注';
comment on column GK_BASIC_JSJY_FJB.wjnr
  is '文件内容';
comment on column GK_BASIC_JSJY_FJB.wjdx
  is '文件大小';
comment on column GK_BASIC_JSJY_FJB.ssid
  is '所属ID关联实体ID';
comment on column GK_BASIC_JSJY_FJB.sstype
  is '所属类型关联业务表';
comment on column GK_BASIC_JSJY_FJB.filename
  is '文件名';
comment on column GK_BASIC_JSJY_FJB.filepath
  is '文件路径';
  comment on column GK_BASIC_JSJY_FJB.fjbz
  is '附件标识';
alter table GK_BASIC_JSJY_FJB
  add primary key (ID);