create table MTS_DINGGROUP_CONFIG
(
  gid              VARCHAR2(32) not null,
  create_id        VARCHAR2(32) not null,
  create_date      DATE default SYSDATE not null,
  modify_id        VARCHAR2(32),
  modify_date      DATE,
  is_active        NUMBER(1) default 0 not null,
  is_delete        NUMBER(1) default 0 not null,
  uda1             VARCHAR2(500),
  uda2             VARCHAR2(50),
  uda3             VARCHAR2(50),
  uda4             VARCHAR2(50),
  uda5             VARCHAR2(50),
  deleted          VARCHAR2(32),
  data_role        VARCHAR2(32),
  data_role1       VARCHAR2(32) default -1,
  data_role2       VARCHAR2(32) default 0,
  uda1c            VARCHAR2(100),
  uda1n            VARCHAR2(100),
  uda2c            VARCHAR2(100),
  uda2n            VARCHAR2(100),
  uda3c            VARCHAR2(100),
  uda3n            VARCHAR2(100),
  uda4c            VARCHAR2(100),
  uda4n            VARCHAR2(100),
  uda5c            VARCHAR2(100),
  uda5n            VARCHAR2(100),
  EH_DYNAMIC_GRID_UDA_GID    VARCHAR2(32),
  code             VARCHAR2(100),
  name             VARCHAR2(255),
  description      VARCHAR2(500),
  group_url        VARCHAR2(500),
  group_license    VARCHAR2(200),
  func_node        VARCHAR2(500),
  is_rel_center    NUMBER(1),
  remark           VARCHAR2(500)
);
-- Add comments to the table 
comment on table MTS_DINGGROUP_CONFIG
  is '钉钉群配置表';
-- Add comments to the columns 
comment on column MTS_DINGGROUP_CONFIG.gid
  is '主键';
comment on column MTS_DINGGROUP_CONFIG.create_id
  is '创建人';
comment on column MTS_DINGGROUP_CONFIG.create_date
  is '创建时间';
comment on column MTS_DINGGROUP_CONFIG.modify_id
  is '修改人';
comment on column MTS_DINGGROUP_CONFIG.modify_date
  is '修改日期';
comment on column MTS_DINGGROUP_CONFIG.is_active
  is '激活标识(0激活1冻结)';
comment on column MTS_DINGGROUP_CONFIG.is_delete
  is '删除标识(0未删除1删除)';
comment on column MTS_DINGGROUP_CONFIG.uda1
  is '预留字段1';
comment on column MTS_DINGGROUP_CONFIG.uda2
  is '预留字段2';
comment on column MTS_DINGGROUP_CONFIG.uda3
  is '预留字段3';
comment on column MTS_DINGGROUP_CONFIG.uda4
  is '预留字段4';
comment on column MTS_DINGGROUP_CONFIG.uda5
  is '预留字段5';
comment on column MTS_DINGGROUP_CONFIG.data_role
  is '工厂GID';
comment on column MTS_DINGGROUP_CONFIG.data_role1
  is '工作中心 GID';
comment on column MTS_DINGGROUP_CONFIG.data_role2
  is '工作中心层级权值';
comment on column MTS_DINGGROUP_CONFIG.uda1c
  is '备用字段1编码';
comment on column MTS_DINGGROUP_CONFIG.uda1n
  is '备用字段1名称';
comment on column MTS_DINGGROUP_CONFIG.uda2c
  is '备用字段2编码';
comment on column MTS_DINGGROUP_CONFIG.uda2n
  is '备用字段2名称';
comment on column MTS_DINGGROUP_CONFIG.uda3c
  is '备用字段3编码';
comment on column MTS_DINGGROUP_CONFIG.uda3n
  is '备用字段3名称';
comment on column MTS_DINGGROUP_CONFIG.uda4c
  is '备用字段4编码';
comment on column MTS_DINGGROUP_CONFIG.uda4n
  is '备用字段4名称';
comment on column MTS_DINGGROUP_CONFIG.uda5c
  is '备用字段5编码';
comment on column MTS_DINGGROUP_CONFIG.uda5n
  is '备用字段5名称';
comment on column MTS_DINGGROUP_CONFIG.EH_DYNAMIC_GRID_UDA_GID
  is '动态表格配置字段';
comment on column MTS_DINGGROUP_CONFIG.code
  is '编码';
comment on column MTS_DINGGROUP_CONFIG.name
  is '名称';
comment on column MTS_DINGGROUP_CONFIG.description
  is '描述信息';
comment on column MTS_DINGGROUP_CONFIG.group_url
  is '群地址';
comment on column MTS_DINGGROUP_CONFIG.group_license
  is '群密钥';
comment on column MTS_DINGGROUP_CONFIG.func_node
  is '功能节点';
comment on column MTS_DINGGROUP_CONFIG.is_rel_center
  is '是否关联工作中心（1是0否）';
comment on column MTS_DINGGROUP_CONFIG.remark
  is '备注';
-- Create/Recreate primary, unique and foreign key constraints 
alter table MTS_DINGGROUP_CONFIG
  add constraint PK_MTS_DINGGROUP_CONFIG primary key (GID);



create table MTS_DINGGROUP_CONFIG_CENTER
(
  gid              VARCHAR2(32) not null,
  create_id        VARCHAR2(32) not null,
  create_date      DATE default SYSDATE not null,
  modify_id        VARCHAR2(32),
  modify_date      DATE,
  is_active        NUMBER(1) default 0 not null,
  is_delete        NUMBER(1) default 0 not null,
  uda1             VARCHAR2(500),
  uda2             VARCHAR2(50),
  uda3             VARCHAR2(50),
  uda4             VARCHAR2(50),
  uda5             VARCHAR2(50),
  deleted          VARCHAR2(32),
  data_role        VARCHAR2(32),
  data_role1       VARCHAR2(32) default -1,
  data_role2       VARCHAR2(32) default 0,
  uda1c            VARCHAR2(100),
  uda1n            VARCHAR2(100),
  uda2c            VARCHAR2(100),
  uda2n            VARCHAR2(100),
  uda3c            VARCHAR2(100),
  uda3n            VARCHAR2(100),
  uda4c            VARCHAR2(100),
  uda4n            VARCHAR2(100),
  uda5c            VARCHAR2(100),
  uda5n            VARCHAR2(100),
  EH_DYNAMIC_GRID_UDA_GID    VARCHAR2(32),
  main_gid         VARCHAR2(32),
  work_center_gid  VARCHAR2(32),
  work_center_code VARCHAR2(100),
  work_center_name VARCHAR2(255)
);
-- Add comments to the table 
comment on table MTS_DINGGROUP_CONFIG_CENTER
  is '钉钉群配置表关联工作中心';
-- Add comments to the columns 
comment on column MTS_DINGGROUP_CONFIG_CENTER.gid
  is '主键';
comment on column MTS_DINGGROUP_CONFIG_CENTER.create_id
  is '创建人';
comment on column MTS_DINGGROUP_CONFIG_CENTER.create_date
  is '创建时间';
comment on column MTS_DINGGROUP_CONFIG_CENTER.modify_id
  is '修改人';
comment on column MTS_DINGGROUP_CONFIG_CENTER.modify_date
  is '修改日期';
comment on column MTS_DINGGROUP_CONFIG_CENTER.is_active
  is '激活标识(0激活1冻结)';
comment on column MTS_DINGGROUP_CONFIG_CENTER.is_delete
  is '删除标识(0未删除1删除)';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda1
  is '预留字段1';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda2
  is '预留字段2';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda3
  is '预留字段3';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda4
  is '预留字段4';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda5
  is '预留字段5';
comment on column MTS_DINGGROUP_CONFIG_CENTER.data_role
  is '工厂GID';
comment on column MTS_DINGGROUP_CONFIG_CENTER.data_role1
  is '工作中心 GID';
comment on column MTS_DINGGROUP_CONFIG_CENTER.data_role2
  is '工作中心层级权值';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda1c
  is '备用字段1编码';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda1n
  is '备用字段1名称';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda2c
  is '备用字段2编码';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda2n
  is '备用字段2名称';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda3c
  is '备用字段3编码';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda3n
  is '备用字段3名称';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda4c
  is '备用字段4编码';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda4n
  is '备用字段4名称';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda5c
  is '备用字段5编码';
comment on column MTS_DINGGROUP_CONFIG_CENTER.uda5n
  is '备用字段5名称';
comment on column MTS_DINGGROUP_CONFIG_CENTER.EH_DYNAMIC_GRID_UDA_GID
  is '动态表格配置字段';
comment on column MTS_DINGGROUP_CONFIG_CENTER.main_gid
  is '配置主表GID';
comment on column MTS_DINGGROUP_CONFIG_CENTER.work_center_gid
  is '工作中心GID';
comment on column MTS_DINGGROUP_CONFIG_CENTER.work_center_code
  is '工作中心编码';
comment on column MTS_DINGGROUP_CONFIG_CENTER.work_center_name
  is '工作中心名称';
-- Create/Recreate primary, unique and foreign key constraints 
alter table MTS_DINGGROUP_CONFIG_CENTER
  add constraint PK_MTS_DINGGROUP_CONFIG_CENTER primary key (GID);
