
drop table if exists sb_armtrainorg;
CREATE TABLE `sb_armtrainorg` (
`id`  int(11) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`active`  bit(1) NULL DEFAULT NULL COMMENT '是否删除' ,
`create_time`  datetime NULL DEFAULT NULL COMMENT '创建时间' ,
`update_time`  datetime NULL DEFAULT NULL COMMENT '更新时间' ,
`update_by`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改者' ,
`userid`  int(11) NULL DEFAULT NULL COMMENT '用户ID' ,
`orgname`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '培训机构（院校）名称' ,
`orgadd`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '*培训机构（院校）地址' ,
`gunnum`  int(11) NULL DEFAULT NULL COMMENT '培训用枪支数量' ,
`legalname`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法定代表人名称' ,
`legalcardnumber`  varchar(18) NULL DEFAULT NULL COMMENT '法定代表人身份证号' ,
`legalphone`  varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法定代表人手机' ,
`traincontext`  varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '培训内容' ,
`template_rar`  varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '培训内容上传文件' ,
`province`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '省' ,
`city`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '市' ,
`district`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区' ,
`szss`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所在地省市区' ,

  `approvalstate` varchar(3) DEFAULT NULL,
  `Approvalperson` varchar(20) DEFAULT NULL COMMENT '审批人',
  `approvaldate` date DEFAULT NULL COMMENT '审批时间',
  `approvalreason` varchar(200) DEFAULT NULL COMMENT '审批原因',
INDEX `arm_train_key` (`id`) USING BTREE
)
ENGINE=InnoDB
ROW_FORMAT=COMPACT
;


ALTER TABLE `sb_armtrainorg`
ADD COLUMN `reply_rar`  varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `approvalreason`,
ADD COLUMN `reply_state`  varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `reply_rar`;

ALTER TABLE `sb_armtrainorg`
ADD COLUMN `info_rar`  varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资料补正告知书' AFTER `reply_state`;

ALTER TABLE `sb_armtrainorg`
ADD COLUMN `replyreason`  varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '批复意见' AFTER `info_rar`;

ALTER TABLE `sb_armtrainorg`
ADD COLUMN `policeid`  int(11) NULL DEFAULT NULL COMMENT '受理民警' AFTER `replyreason`;

