/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


# Dump of table admin
# ------------------------------------------------------------

DROP TABLE IF EXISTS `admin`;

CREATE TABLE `admin` (
  `id` varchar(32) NOT NULL,
  `mobile` varchar(12) DEFAULT NULL COMMENT '手机号(登录帐号)',
  `name` varchar(6) DEFAULT NULL COMMENT '用户名',
  `password` varchar(32) DEFAULT NULL COMMENT '密码',
  `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `number` int(6) DEFAULT NULL COMMENT '员工工号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_activity
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_activity`;

CREATE TABLE `org_activity` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `activity_number` varchar(32) DEFAULT NULL COMMENT '研发活动编号',
  `activity_name` varchar(32) DEFAULT NULL COMMENT '研发活动名称',
  `start_date` datetime DEFAULT NULL COMMENT '开始日期',
  `end_date` datetime DEFAULT NULL COMMENT '结束日期',
  `participant` varchar(255) DEFAULT NULL COMMENT '参与人员',
  `project_mode` int(1) DEFAULT NULL COMMENT '是否是内部立项',
  `technical_field1` varchar(3) DEFAULT NULL COMMENT '技术领域1st select',
  `technical_field2` varchar(3) DEFAULT NULL COMMENT '技术领域2nd select',
  `technical_field3` varchar(3) DEFAULT NULL COMMENT '技术领域3rd select',
  `technical_source` int(1) DEFAULT NULL COMMENT '技术来源',
  `intellectual_property_number` varchar(500) DEFAULT NULL COMMENT '知识产权编号',
  `budget` int(6) DEFAULT NULL COMMENT '研发经费总预算(万元)',
  `first_year_expenditure` int(6) DEFAULT NULL COMMENT '第一年研发经费支出(万元)',
  `second_year_expenditure` int(6) DEFAULT NULL COMMENT '第二年研发经费支出(万元)',
  `third_year_expenditure` int(6) DEFAULT NULL COMMENT '第三年研发经费支出(万元)',
  `implement` varchar(500) DEFAULT NULL COMMENT '目的及组织实施方式',
  `technology_innovation` varchar(500) DEFAULT NULL COMMENT '核心技术及创新点',
  `achievement` varchar(500) DEFAULT NULL COMMENT '取得的阶段性成果',
  `proof_url` varchar(255) DEFAULT NULL COMMENT '立项证明材料URL',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_activity_cost
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_activity_cost`;

CREATE TABLE `org_activity_cost` (
  `id` varchar(36) NOT NULL,
  `aid` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `activity_number` varchar(32) DEFAULT NULL COMMENT '项目编号',
  `internal_labor_cost` int(6) DEFAULT NULL COMMENT '内部人员人工费用（万元）',
  `internal_direct_cost` int(6) DEFAULT NULL COMMENT '内部直接投入费用（万元）',
  `internal_depreciation_cost` int(6) DEFAULT NULL COMMENT '内部折旧费用与长期待摊费用（万元）',
  `internal_amortization_cost` int(6) DEFAULT NULL COMMENT '内部无形资产摊销费用（万元）',
  `internal_design_cost` int(6) DEFAULT NULL COMMENT '内部设计费用(万元)',
  `internal_equipment_cost` int(6) DEFAULT NULL COMMENT '内部装备调试费用与实验费用（万元）',
  `internal_other_cost` int(6) DEFAULT NULL COMMENT '内部其他费用(万元)',
  `external_total_cost` int(6) DEFAULT NULL COMMENT '委托外部研究开发总费用(万元)',
  `external_abroad_cost` int(6) DEFAULT NULL COMMENT '委托外部境内的外部研发费用（万元）',
  `enterprise_filler` varchar(16) DEFAULT NULL COMMENT '企业填报人',
  `sign_date` datetime DEFAULT NULL COMMENT '企业填报人签字日期',
  `sort_number` varchar(32) DEFAULT NULL COMMENT '排序号',
  `start_date` datetime DEFAULT NULL,
  `end_date` datetime DEFAULT NULL,
  `account_url` varchar(255) DEFAULT NULL COMMENT '台帐URL',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `fk_org_activity_cost_org_activity1_idx` (`aid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_cognizance
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_cognizance`;

CREATE TABLE `org_cognizance` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `serial_number` int(8) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `contacts` varchar(36) DEFAULT NULL COMMENT '联系人及联系方式',
  `comment` varchar(1000) DEFAULT NULL COMMENT '备注',
  `consultant` varchar(32) DEFAULT NULL COMMENT '咨询师',
  `technical_field1` int(3) DEFAULT NULL COMMENT '技术领域1st select',
  `technical_field2` int(3) DEFAULT NULL COMMENT '技术领域2nd select',
  `technical_field3` int(3) DEFAULT NULL COMMENT '技术领域3rd select',
  `basic_research_cost` int(6) DEFAULT NULL COMMENT '基础研究投入费用总额(万元)',
  `accident` int(1) DEFAULT NULL COMMENT '申请认定前一年内是否发生过重大安全、重大质量或严重环境违法行为',
  `create_time` datetime DEFAULT NULL COMMENT '派单日',
  `accept_date` datetime DEFAULT NULL COMMENT '受理日',
  `issuing_date` datetime DEFAULT NULL COMMENT '发证日',
  `certificate_number` varchar(36) DEFAULT NULL COMMENT '证书编号',
  `certificate_url` varchar(255) DEFAULT NULL COMMENT '证书URL',
  `state` int(1) DEFAULT NULL COMMENT '状态',
  `year` int(4) DEFAULT NULL COMMENT '申请年份',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `serialNumber_UNIQUE` (`serial_number`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_cognizance_log
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_cognizance_log`;

CREATE TABLE `org_cognizance_log` (
  `id` varchar(36) NOT NULL,
  `cid` varchar(36) NOT NULL,
  `record_time` datetime DEFAULT NULL COMMENT '状态变更录入时间',
  `state` int(1) DEFAULT NULL COMMENT '状态',
  `principal` varchar(32) DEFAULT NULL COMMENT '负责人',
  `operator` varchar(32) DEFAULT NULL COMMENT '操作人',
  `comment` varchar(45) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  KEY `fk_org_cognizance_log_org_cognizance1_idx` (`cid`),
  CONSTRAINT `fk_org_cognizance_log_org_cognizance1` FOREIGN KEY (`cid`) REFERENCES `org_cognizance` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_finance
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_finance`;

CREATE TABLE `org_finance` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `main_business_income` int(6) DEFAULT NULL COMMENT '主营业务收入\r(万元)',
  `management_cost` int(6) DEFAULT NULL COMMENT '管理费用(万元)',
  `operating_profit` int(6) DEFAULT NULL COMMENT '营业利润(万元)',
  `various_tax` int(6) DEFAULT NULL COMMENT '支付的各项税费(万元)',
  `current_asset` int(6) DEFAULT NULL COMMENT '流动资产',
  `net_fixed_asset` int(6) DEFAULT NULL COMMENT '固定资产净额\r(万元)',
  `total_asset` int(6) DEFAULT NULL COMMENT '资产总额(万元)',
  `net_asset` int(6) DEFAULT NULL COMMENT '所有者权益合计(万元)',
  `gross_profit` int(6) DEFAULT NULL COMMENT '利润总额(万元)',
  `net_profit` int(6) DEFAULT NULL COMMENT '净利润(万元)',
  `sales_revenue` int(6) DEFAULT NULL COMMENT '销售收入(万元)',
  `year` int(4) DEFAULT NULL COMMENT '年份',
  `finance_url` varchar(255) DEFAULT NULL COMMENT '财务报表URL',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `fk_org_finance_user1_idx` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_honor_datum
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_honor_datum`;

CREATE TABLE `org_honor_datum` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `name` varchar(32) DEFAULT NULL COMMENT '荣誉或证明材料名称',
  `issuing_mechanism` varchar(36) DEFAULT NULL COMMENT '发证机构',
  `issuing_time` datetime DEFAULT NULL COMMENT '发证时间',
  `enclosure_url` varchar(255) DEFAULT NULL COMMENT '附件材料URL',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `fk_org_honor_datum_user1_idx` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_human_resource
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_human_resource`;

CREATE TABLE `org_human_resource` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `firm_total` int(6) DEFAULT NULL COMMENT '企业职工总数',
  `tech_total` int(6) DEFAULT NULL COMMENT '科技人员总数',
  `firm_in_service` int(6) DEFAULT NULL COMMENT '企业在职员工人数',
  `tech_in_service` int(6) DEFAULT NULL COMMENT '科技在职员工人数',
  `firm_part_time` int(6) DEFAULT NULL COMMENT '企业兼职人数',
  `tech_part_time` int(6) DEFAULT NULL COMMENT '科技人员兼职人数',
  `firm_temporary` int(6) DEFAULT NULL COMMENT '企业临时聘用人数',
  `tech_temporary` int(6) DEFAULT NULL COMMENT '科技人员临时聘用人数',
  `firm_foreign` int(6) DEFAULT NULL COMMENT '企业外籍人员数',
  `tech_foreign` int(6) DEFAULT NULL COMMENT '外籍科技人员数',
  `firm_abroad` int(6) DEFAULT NULL COMMENT '企业留学归国人员数',
  `tech_abroad` int(6) DEFAULT NULL COMMENT '留学归国科技人员数',
  `firm_core` int(6) DEFAULT NULL COMMENT '企业千人计划人数',
  `tech_core` int(6) DEFAULT NULL COMMENT '千人计划科技人员数',
  `doctor` int(6) DEFAULT NULL COMMENT '博士人数',
  `master` int(6) DEFAULT NULL COMMENT '硕士人数',
  `undergraduate` int(6) DEFAULT NULL COMMENT '本科人数',
  `college` int(6) DEFAULT NULL COMMENT '大专人数',
  `senior_title` int(6) DEFAULT NULL COMMENT '高级职称人数',
  `intermediate_title` int(6) DEFAULT NULL COMMENT '中级职称人数',
  `junior_title` int(6) DEFAULT NULL COMMENT '初级职称人数',
  `senior_mechanic` int(6) DEFAULT NULL COMMENT '高级技工人数',
  `below_thirty` int(6) DEFAULT NULL COMMENT '三十岁及以下员工人数',
  `thirtyone_to_thirtyfour` int(6) DEFAULT NULL COMMENT '三十一至三十四岁员工人数',
  `fortyone_to_fifty` int(6) DEFAULT NULL COMMENT '四十一至五十岁员工人数',
  `above_fifty` int(6) DEFAULT NULL COMMENT '五十岁以上员工人数',
  `year` int(4) DEFAULT NULL COMMENT '年份',
  `roster_url` varchar(255) DEFAULT NULL COMMENT '花名册URL',
  `social_security_url` varchar(255) DEFAULT NULL COMMENT '社保情况URL',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_intellectual_property
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_intellectual_property`;

CREATE TABLE `org_intellectual_property` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `pid` varchar(36) DEFAULT NULL COMMENT '专利记录ID',
  `intellectual_property_number` varchar(32) DEFAULT NULL COMMENT '知识产权编号',
  `intellectual_property_name` varchar(32) DEFAULT NULL COMMENT '知识产权名称',
  `sort_number` varchar(36) DEFAULT NULL COMMENT '排序号',
  `catagory` int(2) DEFAULT NULL COMMENT '类别',
  `obtain_way` int(1) DEFAULT NULL COMMENT '获得方式',
  `authorization_number` varchar(32) DEFAULT NULL COMMENT '授权号',
  `authorization_date` datetime DEFAULT NULL COMMENT '授权日期',
  `evaluation_category` int(1) DEFAULT NULL COMMENT '0--Ⅰ类, 1--Ⅱ类',
  `property_right_url` varchar(255) DEFAULT NULL COMMENT '知识产权证书URL',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `fk_org_intellectual_property_user1_idx` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_ratepay
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_ratepay`;

CREATE TABLE `org_ratepay` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `operating_income` int(6) DEFAULT NULL COMMENT '营业收入(万元)',
  `management_cost` int(6) DEFAULT NULL COMMENT '管理费用(万元)',
  `operating_profit` int(6) DEFAULT NULL COMMENT '营业利润\r(万元)',
  `non_operating_income` int(6) DEFAULT NULL COMMENT '营业外收入(万元)',
  `non_taxable_income` int(6) DEFAULT NULL COMMENT '不征税收入\r(万元)',
  `tax_exempt_income` int(6) DEFAULT NULL COMMENT '免税收入(万元)',
  `subsidy_income` int(6) DEFAULT NULL COMMENT '政府补助收入(万元)',
  `year` int(4) DEFAULT NULL COMMENT '年份',
  `tax_return_url` varchar(255) DEFAULT NULL COMMENT '纳税申报表url',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `fk_org_ratepay_user1_idx` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_standard
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_standard`;

CREATE TABLE `org_standard` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `standard_name` varchar(32) DEFAULT NULL COMMENT '标准名称',
  `standard_number` varchar(36) DEFAULT NULL COMMENT '标准编号',
  `standard_level` int(1) DEFAULT NULL COMMENT '标准级别',
  `participate_way` int(11) DEFAULT NULL COMMENT '参与方式',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_tech_achievement
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_tech_achievement`;

CREATE TABLE `org_tech_achievement` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `achievement_name` varchar(32) DEFAULT NULL COMMENT '成果名称',
  `source` varchar(36) DEFAULT NULL COMMENT '来源',
  `conversion_form` int(1) DEFAULT NULL COMMENT '转化形式',
  `conversion_result` varchar(255) DEFAULT NULL COMMENT '转化结果',
  `year` int(4) DEFAULT NULL COMMENT '转化年份',
  `enclosure_url` varchar(255) DEFAULT NULL COMMENT '证明材料附件URL',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `fk_org_tech_achievment_user1_idx` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_tech_center
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_tech_center`;

CREATE TABLE `org_tech_center` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `center_name` varchar(36) DEFAULT NULL COMMENT '技术中心名称',
  `founding_time` datetime DEFAULT NULL COMMENT '成立时间',
  `principal` varchar(32) DEFAULT NULL COMMENT '负责人',
  `system_catalog` longtext COMMENT '制度目录',
  `comment` varchar(1000) DEFAULT NULL,
  `system_url` varchar(255) DEFAULT NULL COMMENT '制度目录URL',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `fk_org_tech_center_user1_idx` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_tech_center_detail
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_tech_center_detail`;

CREATE TABLE `org_tech_center_detail` (
  `id` varchar(36) NOT NULL,
  `cid` varchar(36) NOT NULL,
  `project_time` datetime DEFAULT NULL COMMENT '产学研时间',
  `project_name` varchar(32) DEFAULT NULL COMMENT '产学研名称',
  `term_time` datetime DEFAULT NULL COMMENT '期限',
  `institution` varchar(32) DEFAULT NULL COMMENT '大学机构',
  `protocol_url` varchar(255) DEFAULT NULL COMMENT '协议URL',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `fk_org_tech_center_detail_org_tech_center1_idx` (`cid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table org_tech_product
# ------------------------------------------------------------

DROP TABLE IF EXISTS `org_tech_product`;

CREATE TABLE `org_tech_product` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `serial_number` varchar(32) DEFAULT NULL COMMENT '编号',
  `product_name` varchar(32) DEFAULT NULL COMMENT '产品名称',
  `technical_field1` int(3) DEFAULT NULL COMMENT '技术领域1st select',
  `technical_field2` int(3) DEFAULT NULL COMMENT '技术领域2nd select',
  `technical_field3` int(3) DEFAULT NULL COMMENT '技术领域3rd select',
  `technical_source` int(1) DEFAULT NULL COMMENT '技术来源',
  `last_year_revenue` varchar(45) DEFAULT NULL COMMENT '上年度销售收入',
  `main_product` int(1) DEFAULT NULL COMMENT '是否是主要产品(服务)',
  `intellectual_property_number` varchar(500) DEFAULT NULL COMMENT '知识产权编号',
  `key_technology` varchar(500) DEFAULT NULL COMMENT '关键技术及主要技术指标',
  `competitive_edge` varchar(500) DEFAULT NULL COMMENT '与同类产品（服务）的竞争优势',
  `condition_effect` varchar(500) DEFAULT NULL COMMENT '知识产权获得情况及其对产品（服务）在技术上发挥的支持作用',
  `year` int(6) DEFAULT NULL COMMENT '年份',
  `create_time` datetime DEFAULT NULL COMMENT '记录创建时间',
  `deleted_sign` int(1) DEFAULT '0' COMMENT '删除标记',
  PRIMARY KEY (`id`),
  KEY `fk_org_tech_product_user1_idx` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table organization_identity
# ------------------------------------------------------------

DROP TABLE IF EXISTS `organization_identity`;

CREATE TABLE `organization_identity` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `contacts` varchar(6) DEFAULT NULL COMMENT '联系人',
  `contact_mobile` varchar(16) DEFAULT NULL COMMENT '联系方式',
  `fixed_tel` varchar(16) DEFAULT NULL COMMENT '固定电话',
  `qq` varchar(16) DEFAULT NULL COMMENT 'QQ号',
  `postal_address` varchar(255) DEFAULT NULL COMMENT '通讯地址',
  `postcode` varchar(8) DEFAULT NULL COMMENT '邮政编码',
  `aft_username` varchar(32) DEFAULT NULL COMMENT '用户名',
  `unit_name` varchar(45) DEFAULT NULL COMMENT '单位名称',
  `registered_capital` int(6) DEFAULT NULL COMMENT '注册资金',
  `licence_number` varchar(32) DEFAULT NULL COMMENT '营业执照注册号',
  `licence_province` varchar(12) DEFAULT NULL COMMENT '营业执照所在地--省',
  `licence_city` varchar(12) DEFAULT NULL COMMENT '营业执照所在地-市',
  `licence_area` varchar(12) DEFAULT NULL COMMENT '营业执照所在地-区(县)',
  `licence_scanning_url` varchar(255) DEFAULT NULL COMMENT '营业执照副本扫描件URL',
  `org_code` varchar(32) DEFAULT NULL COMMENT '组织机构代码证号码',
  `org_code_url` varchar(255) DEFAULT NULL COMMENT '组织机构代码证URL',
  `bank_account` varchar(32) DEFAULT NULL COMMENT '银行账号',
  `banks` varchar(32) DEFAULT NULL COMMENT '开户行',
  `bank_branch` varchar(32) DEFAULT NULL COMMENT '开户行支行',
  `bank_card_number` varchar(32) DEFAULT NULL COMMENT '银行卡号',
  `validation_amount` decimal(6,4) DEFAULT '0.0000' COMMENT '打入账内信息',
  `identity_type` int(1) DEFAULT NULL COMMENT '身份类型',
  `location_province` varchar(12) DEFAULT NULL COMMENT '开户行所在地-省',
  `location_city` varchar(12) DEFAULT NULL COMMENT '开户行所在地-市',
  `location_area` varchar(12) DEFAULT NULL COMMENT '开户行所在地-区(县)',
  `legal_person` varchar(16) DEFAULT NULL COMMENT '法人',
  `legal_person_id_card` varchar(32) DEFAULT NULL COMMENT '法人身份证号',
  `last_year_tax_report_url` varchar(255) DEFAULT NULL COMMENT '上年度纳税报表',
  `audit_status` int(1) DEFAULT '0' COMMENT '审核状态',
  `process` int(1) DEFAULT '0' COMMENT '实名认证流程',
  `wrong_count` int(1) DEFAULT '0' COMMENT '输入打款金额错误次数',
  `payment_date` datetime DEFAULT NULL COMMENT '打款日期',
  `first_contacts` varchar(16) DEFAULT NULL,
  `first_mobile` varchar(16) DEFAULT NULL,
  `second_contacts` varchar(16) DEFAULT NULL,
  `second_mobile` varchar(16) DEFAULT NULL,
  `third_contacts` varchar(16) DEFAULT NULL,
  `third_mobile` varchar(16) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table organization_info
# ------------------------------------------------------------

DROP TABLE IF EXISTS `organization_info`;

CREATE TABLE `organization_info` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `identity_type` varchar(6) DEFAULT NULL COMMENT '身份类型',
  `company_name` varchar(45) DEFAULT NULL COMMENT '公司名称',
  `legal_person` varchar(6) DEFAULT NULL COMMENT '法人代表',
  `location_province` varchar(12) DEFAULT NULL COMMENT '所在地--省',
  `location_city` varchar(12) DEFAULT NULL COMMENT '所在地--市',
  `location_area` varchar(12) DEFAULT NULL COMMENT '所在地--区',
  `unit_size` varchar(12) DEFAULT NULL COMMENT '单位规模',
  `company_introduction` varchar(1002) DEFAULT NULL COMMENT '单位简介',
  `home_unit` varchar(45) DEFAULT NULL COMMENT '所属单位',
  `logo_url` varchar(255) DEFAULT NULL COMMENT 'logo图',
  `publicity_picture_url` longtext COMMENT '宣传图片',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table organization_properties
# ------------------------------------------------------------

DROP TABLE IF EXISTS `organization_properties`;

CREATE TABLE `organization_properties` (
  `id` varchar(36) NOT NULL,
  `oid` varchar(36) NOT NULL,
  `qualification` varchar(45) DEFAULT NULL COMMENT '企业资质',
  `turnover` int(8) DEFAULT NULL COMMENT '年营业额',
  `college_attribute` varchar(45) DEFAULT NULL COMMENT '院校属性',
  `college_establish_time` varchar(12) DEFAULT NULL COMMENT '院校创办时间',
  `academician` int(5) DEFAULT NULL COMMENT '院士',
  `doctoral_tutor` int(5) DEFAULT NULL COMMENT '博士生导师',
  `master_tutor` int(5) DEFAULT NULL COMMENT '硕士生导师',
  `other_expert` int(5) DEFAULT NULL COMMENT '其他专家',
  `national_lab` int(5) DEFAULT NULL COMMENT '国家重点实验室',
  `education_lab` int(5) DEFAULT NULL,
  `enterprise_center` int(5) DEFAULT NULL COMMENT '企业共建研究中心',
  `other_center` int(5) DEFAULT NULL COMMENT '其他研究中心',
  `institution_establish_time` varchar(12) DEFAULT NULL COMMENT '研究机构创办时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table organization_tech
# ------------------------------------------------------------

DROP TABLE IF EXISTS `organization_tech`;

CREATE TABLE `organization_tech` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `technical_people_num` varchar(12) DEFAULT NULL COMMENT '技术人员数量',
  `search_area_category` varchar(255) DEFAULT NULL COMMENT '重点研究领域类别',
  `search_area_det` varchar(32) DEFAULT NULL COMMENT '重点研究领域明细',
  `specialty` varchar(32) DEFAULT NULL COMMENT '擅长领域',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table patent_cost
# ------------------------------------------------------------

DROP TABLE IF EXISTS `patent_cost`;

CREATE TABLE `patent_cost` (
  `id` varchar(36) NOT NULL,
  `pid` varchar(36) NOT NULL,
  `annual_fee` int(6) DEFAULT NULL COMMENT '年登印费',
  `annual_fee_state` int(1) DEFAULT '0' COMMENT '年登印费缴费状态',
  `application_fee` int(6) DEFAULT NULL COMMENT '申请费',
  `trial_fee` int(6) DEFAULT NULL COMMENT '实审费',
  `printing_fee` int(6) DEFAULT NULL COMMENT '文印费',
  `funds` int(1) DEFAULT NULL COMMENT '是否请款',
  `reimbursement` int(1) DEFAULT NULL COMMENT '是否报销',
  `payment_state` int(1) DEFAULT '0' COMMENT '缴费状态',
  PRIMARY KEY (`id`),
  KEY `fk_patent_cost_patent_info1_idx` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table patent_info
# ------------------------------------------------------------

DROP TABLE IF EXISTS `patent_info`;

CREATE TABLE `patent_info` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `serial_number` int(8) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `patent_number` varchar(16) DEFAULT NULL COMMENT '申请号/专利号',
  `patent_name` varchar(16) DEFAULT NULL COMMENT '专利名称',
  `patent_catagory` int(1) DEFAULT NULL COMMENT '专利类型',
  `patent_state` int(1) DEFAULT NULL COMMENT '专利状态',
  `patent_field` int(2) DEFAULT NULL COMMENT '专利领域',
  `patent_des` varchar(1000) DEFAULT NULL COMMENT '专利简介',
  `patent_prory_statement_url` varchar(255) DEFAULT NULL COMMENT '专利代理委托书',
  `patent_writing_url` varchar(255) DEFAULT NULL COMMENT '专利稿件',
  `authorization_notice_url` varchar(255) DEFAULT NULL COMMENT '授权通知书',
  `patent_certificate_url` varchar(255) DEFAULT NULL COMMENT '专利证书',
  `patent_application_date` datetime DEFAULT NULL COMMENT '申请日/受理日',
  `first_inventor_name` varchar(32) DEFAULT NULL COMMENT '第一发明人',
  `first_inventor_nationality` varchar(16) DEFAULT NULL COMMENT '第一发明人国籍',
  `first_inventor_id_number` varchar(18) DEFAULT NULL COMMENT '第一发明人身份证号',
  `first_inventor_is_publish` int(1) DEFAULT '0' COMMENT '第一发明人是否公布(0--不公布,1--公布)',
  `second_inventor_name` varchar(32) DEFAULT NULL COMMENT '第二发明人姓名',
  `second_inventor_nationality` varchar(16) DEFAULT NULL COMMENT '第二发明人国际',
  `second_inventor_is_publish` int(1) DEFAULT '0' COMMENT '第二发明人是否公布(0--不公布,1--公布)',
  `third_inventor_name` varchar(32) DEFAULT NULL COMMENT '第三发明人姓名',
  `third_inventor_nationality` varchar(12) DEFAULT NULL COMMENT '第三发明人国籍',
  `third_inventor_is_publish` int(1) DEFAULT '0' COMMENT '第三发明人是否公布(0--不公布,1--公布)',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `author` varchar(32) DEFAULT NULL COMMENT '撰写人',
  `authorized_date` datetime DEFAULT NULL COMMENT '授权日/发文日',
  `office` varchar(16) DEFAULT NULL COMMENT '事务所',
  `principal` varchar(32) DEFAULT NULL COMMENT '负责人',
  `confirm_state` int(1) DEFAULT '0' COMMENT '用户确认申报材料',
  PRIMARY KEY (`id`),
  KEY `serialNumber_UNIQUE` (`serial_number`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table patent_log
# ------------------------------------------------------------

DROP TABLE IF EXISTS `patent_log`;

CREATE TABLE `patent_log` (
  `id` varchar(36) NOT NULL,
  `pid` varchar(36) NOT NULL,
  `record_time` datetime DEFAULT NULL COMMENT '状态变更录入时间',
  `state` int(1) DEFAULT NULL COMMENT '状态',
  `principal` varchar(32) DEFAULT NULL COMMENT '负责人',
  `operator` varchar(32) DEFAULT NULL COMMENT '操作人',
  `comment` varchar(45) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  KEY `fk_patent_log_patent_info1_idx` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table patent_registration
# ------------------------------------------------------------

DROP TABLE IF EXISTS `patent_registration`;

CREATE TABLE `patent_registration` (
  `id` varchar(36) NOT NULL,
  `pid` varchar(36) NOT NULL,
  `acceptance_receive_time` datetime DEFAULT NULL COMMENT '受理通知书收到时间',
  `acceptance_issue_time` datetime DEFAULT NULL COMMENT '受理通知书发出时间',
  `acceptance_tracking_number` varchar(16) DEFAULT NULL COMMENT '受理通知书发出快递单号',
  `acceptance_express_company` varchar(8) DEFAULT NULL COMMENT '受理通知书快递公司',
  `authorization_receive_time` datetime DEFAULT NULL COMMENT '授权通知书收到时间',
  `authorization_issue_time` datetime DEFAULT NULL COMMENT '授权通知书发出时间',
  `authorization_tracking_number` varchar(16) DEFAULT NULL COMMENT '授权通知书快递单号',
  `authorization_express_company` varchar(8) DEFAULT NULL COMMENT '授权通知书快递公司',
  `certificate_recieve_time` datetime DEFAULT NULL COMMENT '专利证书收到时间',
  `certificate_issue_time` datetime DEFAULT NULL COMMENT '专利证书发出时间',
  `certificate_tracking_number` varchar(16) DEFAULT NULL COMMENT '专利证书快递单号',
  `certificate_express_company` varchar(8) DEFAULT NULL COMMENT '专利证书快递公司',
  PRIMARY KEY (`id`),
  KEY `fk_table1_patent_info1_idx` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table permission
# ------------------------------------------------------------

DROP TABLE IF EXISTS `permission`;

CREATE TABLE `permission` (
  `id` varchar(36) NOT NULL,
  `url` varchar(128) NOT NULL COMMENT '权限对应的url path',
  `name` varchar(45) DEFAULT NULL COMMENT '权限名字',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table role
# ------------------------------------------------------------

DROP TABLE IF EXISTS `role`;

CREATE TABLE `role` (
  `id` varchar(36) NOT NULL,
  `role_name` varchar(16) DEFAULT NULL,
  `role_type` int(6) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table role_permission
# ------------------------------------------------------------

DROP TABLE IF EXISTS `role_permission`;

CREATE TABLE `role_permission` (
  `rid` varchar(36) NOT NULL,
  `pid` varchar(36) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table user
# ------------------------------------------------------------

DROP TABLE IF EXISTS `user`;

CREATE TABLE `user` (
  `id` varchar(36) NOT NULL,
  `mobile` varchar(12) NOT NULL COMMENT '用户注册手机号，作为登录依据',
  `password` varchar(32) NOT NULL COMMENT '密码，md5+salt',
  `nickname` varchar(16) DEFAULT NULL COMMENT '用户昵称',
  `email` varchar(255) DEFAULT NULL COMMENT '用户邮箱',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
  `number` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户编号',
  `lvl` int(2) DEFAULT '0',
  `type` int(1) NOT NULL DEFAULT '0' COMMENT '个人账号还是组织账号\n默认0为个人账号，1为组织账号',
  PRIMARY KEY (`id`),
  UNIQUE KEY `number_UNIQUE` (`number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table user_ability
# ------------------------------------------------------------

DROP TABLE IF EXISTS `user_ability`;

CREATE TABLE `user_ability` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `ability_label` varchar(255) DEFAULT NULL COMMENT '能力标签',
  `intellect_right` varchar(500) DEFAULT NULL COMMENT '知识产权对企业竞争力的作用 ',
  `science_achievement` varchar(500) DEFAULT NULL COMMENT ' 科技成果转化情况',
  `research_innovation` varchar(500) DEFAULT NULL COMMENT '研究开发与技术创新组织管理情况',
  `personnel` varchar(500) DEFAULT NULL COMMENT ' 管理与科技人员情况',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table user_career
# ------------------------------------------------------------

DROP TABLE IF EXISTS `user_career`;

CREATE TABLE `user_career` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `engaged_field` varchar(255) DEFAULT NULL COMMENT '从事领域',
  `working_age` varchar(3) DEFAULT NULL COMMENT '从业工龄',
  `professional_title` varchar(45) DEFAULT NULL COMMENT '职称名字',
  `professional_title_gettime` varchar(6) DEFAULT NULL COMMENT '职称取得时间(年份)',
  `professional_certificate_url` varchar(255) DEFAULT NULL COMMENT '职称证明图',
  `qualification` varchar(45) DEFAULT NULL COMMENT '执业资格',
  `qualification_gettime` varchar(6) DEFAULT NULL COMMENT '执业资格取得时间(年份)',
  `qualification_certificate_url` varchar(255) DEFAULT NULL COMMENT '执业资格证明图',
  `work_unit` varchar(32) DEFAULT NULL COMMENT '工作单位',
  `position` varchar(16) DEFAULT NULL COMMENT '职位/职务/头衔',
  `experiences` longtext COMMENT '从业经历',
  `achievement` longtext COMMENT '主要成就',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table user_edu
# ------------------------------------------------------------

DROP TABLE IF EXISTS `user_edu`;

CREATE TABLE `user_edu` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `education` varchar(16) DEFAULT NULL COMMENT '学历',
  `major_category` varchar(8) DEFAULT NULL COMMENT '专业类别',
  `major_name` varchar(16) DEFAULT NULL COMMENT '专业名称',
  `graduate_school` varchar(45) DEFAULT NULL COMMENT '毕业学校',
  `graduation_time_year` varchar(4) DEFAULT NULL COMMENT '毕业时间(年份)',
  `graduation_time_month` varchar(2) DEFAULT NULL COMMENT '毕业时间--月',
  `graduation_time_day` varchar(2) DEFAULT NULL COMMENT '毕业时间--日',
  `diploma_url` varchar(255) DEFAULT NULL COMMENT '毕业证图',
  `diploma_code` varchar(32) DEFAULT NULL COMMENT '毕业证编号',
  `degree_diploma_url` varchar(255) DEFAULT NULL COMMENT '学位证明图',
  `degree_code` varchar(32) CHARACTER SET big5 DEFAULT NULL COMMENT '学位证编号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table user_identity
# ------------------------------------------------------------

DROP TABLE IF EXISTS `user_identity`;

CREATE TABLE `user_identity` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `username` varchar(16) DEFAULT NULL COMMENT '姓名',
  `sex` varchar(2) DEFAULT NULL COMMENT '性别',
  `date_of_birth_year` varchar(4) DEFAULT NULL COMMENT '出生年',
  `date_of_birth_month` varchar(2) DEFAULT NULL COMMENT '出生月',
  `id_number` varchar(20) DEFAULT NULL COMMENT '省份证号码',
  `positive_id_url` varchar(255) DEFAULT NULL COMMENT '身份证正面照',
  `opposite_id_url` varchar(255) DEFAULT NULL COMMENT '身份证反面照',
  `aft_username` varchar(16) DEFAULT NULL COMMENT '用户名',
  `province` varchar(16) DEFAULT NULL COMMENT '所在地-省份',
  `city` varchar(16) DEFAULT NULL COMMENT '所在地--市',
  `area` varchar(16) DEFAULT NULL COMMENT '所在地--区',
  `contact_mobile` varchar(16) DEFAULT NULL COMMENT '联系方式',
  `bank_name` varchar(32) DEFAULT NULL COMMENT '银行开户名',
  `bank_account` varchar(32) DEFAULT NULL COMMENT '开户银行',
  `bank_card_number` varchar(32) DEFAULT NULL COMMENT '银行卡号',
  `amount_money` decimal(6,4) DEFAULT NULL COMMENT '打款金额',
  `audit_status` int(1) DEFAULT '0' COMMENT '审核状态(0--未提交审核，1-提交审核，2-审核未打款，3-审核已打款，4-审核未通过，5-审核通过)',
  `process` int(1) DEFAULT '0' COMMENT '实名认证流程',
  `wrong_count` int(1) DEFAULT '0' COMMENT '输入打款金额错误次数',
  `payment_date` datetime DEFAULT NULL COMMENT '打款日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table user_info
# ------------------------------------------------------------

DROP TABLE IF EXISTS `user_info`;

CREATE TABLE `user_info` (
  `id` varchar(36) NOT NULL,
  `uid` varchar(36) NOT NULL,
  `residence_province` varchar(8) DEFAULT NULL COMMENT '居住地--省',
  `residence_city` varchar(12) DEFAULT NULL COMMENT '居住地--市',
  `residence_area` varchar(12) DEFAULT NULL COMMENT '居住地--区',
  `person_portrait_url` varchar(255) DEFAULT NULL COMMENT '个人头像',
  `life_photo_url` varchar(255) DEFAULT NULL COMMENT '生活照',
  `personal_profile` longtext COMMENT '个人简介',
  `fixed_tel_area` varchar(8) DEFAULT NULL COMMENT '固定电话 区号',
  `fixed_tel` varchar(12) DEFAULT NULL COMMENT '固定电话',
  `fixed_tel_extension` varchar(8) DEFAULT NULL COMMENT '固定电话分机号',
  `qq` varchar(16) DEFAULT NULL COMMENT 'QQ号码',
  `postal_address` varchar(255) DEFAULT NULL COMMENT '通讯地址',
  `postcode` varchar(8) DEFAULT NULL COMMENT '邮政编码',
  PRIMARY KEY (`id`),
  KEY `user_id_idx` (`uid`),
  CONSTRAINT `uid` FOREIGN KEY (`uid`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table user_role
# ------------------------------------------------------------

DROP TABLE IF EXISTS `user_role`;

CREATE TABLE `user_role` (
  `uid` varchar(36) NOT NULL,
  `rid` varchar(36) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
