/Dependence/MySQL/Data.sql

https://bitbucket.org/ljlon/medicine · SQL · 203 lines · 124 code · 31 blank · 48 comment · 0 complexity · 982265e3c2cfb1c5263725fa1211ffb4 MD5 · raw file

  1. CREATE DATABASE IF NOT EXISTS `store` /*!40100 DEFAULT CHARACTER SET utf8 */;
  2. USE `store`;
  3. -- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86)
  4. --
  5. -- Host: localhost Database: store
  6. -- ------------------------------------------------------
  7. -- Server version 5.5.24
  8. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  9. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  10. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  11. /*!40101 SET NAMES utf8 */;
  12. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  13. /*!40103 SET TIME_ZONE='+00:00' */;
  14. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  15. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  16. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  17. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  18. --
  19. -- Table structure for table `medicine_class`
  20. --
  21. DROP TABLE IF EXISTS `medicine_class`;
  22. /*!40101 SET @saved_cs_client = @@character_set_client */;
  23. /*!40101 SET character_set_client = utf8 */;
  24. CREATE TABLE `medicine_class` (
  25. `id` int(11) NOT NULL,
  26. `name` varchar(45) DEFAULT NULL,
  27. PRIMARY KEY (`id`)
  28. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  29. /*!40101 SET character_set_client = @saved_cs_client */;
  30. --
  31. -- Dumping data for table `medicine_class`
  32. --
  33. LOCK TABLES `medicine_class` WRITE;
  34. /*!40000 ALTER TABLE `medicine_class` DISABLE KEYS */;
  35. /*!40000 ALTER TABLE `medicine_class` ENABLE KEYS */;
  36. UNLOCK TABLES;
  37. --
  38. -- Table structure for table `user_role`
  39. --
  40. DROP TABLE IF EXISTS `user_role`;
  41. /*!40101 SET @saved_cs_client = @@character_set_client */;
  42. /*!40101 SET character_set_client = utf8 */;
  43. CREATE TABLE `user_role` (
  44. `id` int(11) NOT NULL,
  45. `name` varchar(45) DEFAULT NULL,
  46. PRIMARY KEY (`id`),
  47. UNIQUE KEY `id_UNIQUE` (`id`)
  48. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  49. /*!40101 SET character_set_client = @saved_cs_client */;
  50. --
  51. -- Dumping data for table `user_role`
  52. --
  53. LOCK TABLES `user_role` WRITE;
  54. /*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
  55. INSERT INTO `user_role` VALUES (0,'超级管理员'),(1,'管理员'),(2,'录入员'),(3,'收银员');
  56. /*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
  57. UNLOCK TABLES;
  58. --
  59. -- Table structure for table `user`
  60. --
  61. DROP TABLE IF EXISTS `user`;
  62. /*!40101 SET @saved_cs_client = @@character_set_client */;
  63. /*!40101 SET character_set_client = utf8 */;
  64. CREATE TABLE `user` (
  65. `id` int(11) NOT NULL AUTO_INCREMENT,
  66. `uid` varchar(50) NOT NULL,
  67. `pwd` varchar(50) DEFAULT NULL,
  68. `name` varchar(50) DEFAULT NULL,
  69. `random_key` varchar(50) DEFAULT NULL,
  70. `role_id` int(11) DEFAULT '0',
  71. `create_time` datetime DEFAULT NULL,
  72. PRIMARY KEY (`id`),
  73. UNIQUE KEY `uid_UNIQUE` (`uid`)
  74. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
  75. /*!40101 SET character_set_client = @saved_cs_client */;
  76. --
  77. -- Dumping data for table `user`
  78. --
  79. LOCK TABLES `user` WRITE;
  80. /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  81. INSERT INTO `user` VALUES (0,'0000','4df3cb619d95b5c03c64373541d022ff','刘金龙','090DD3E5',0,'2012-11-09 11:33:23');
  82. /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  83. UNLOCK TABLES;
  84. --
  85. -- Table structure for table `medicine_type`
  86. --
  87. DROP TABLE IF EXISTS `medicine_type`;
  88. /*!40101 SET @saved_cs_client = @@character_set_client */;
  89. /*!40101 SET character_set_client = utf8 */;
  90. CREATE TABLE `medicine_type` (
  91. `id` int(11) NOT NULL AUTO_INCREMENT,
  92. `name` varchar(45) DEFAULT NULL,
  93. PRIMARY KEY (`id`)
  94. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  95. /*!40101 SET character_set_client = @saved_cs_client */;
  96. --
  97. -- Dumping data for table `medicine_type`
  98. --
  99. LOCK TABLES `medicine_type` WRITE;
  100. /*!40000 ALTER TABLE `medicine_type` DISABLE KEYS */;
  101. INSERT INTO `medicine_type` VALUES (0,'中成药'),(1,'保健药'),(2,'中草药'),(3,'西药'),(4,'医疗器械');
  102. /*!40000 ALTER TABLE `medicine_type` ENABLE KEYS */;
  103. UNLOCK TABLES;
  104. --
  105. -- Table structure for table `medicine_form`
  106. --
  107. DROP TABLE IF EXISTS `medicine_form`;
  108. /*!40101 SET @saved_cs_client = @@character_set_client */;
  109. /*!40101 SET character_set_client = utf8 */;
  110. CREATE TABLE `medicine_form` (
  111. `id` int(11) NOT NULL AUTO_INCREMENT,
  112. `name` varchar(45) DEFAULT NULL,
  113. PRIMARY KEY (`id`)
  114. ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
  115. /*!40101 SET character_set_client = @saved_cs_client */;
  116. --
  117. -- Dumping data for table `medicine_form`
  118. --
  119. LOCK TABLES `medicine_form` WRITE;
  120. /*!40000 ALTER TABLE `medicine_form` DISABLE KEYS */;
  121. INSERT INTO `medicine_form` VALUES (0,'片剂'),(1,'胶囊剂'),(2,'注射剂'),(3,'颗粒剂'),(4,'溶液剂'),(5,'粉剂'),(6,'滴剂'),(7,'散剂'),(8,'贴剂'),(9,'涂剂'),(10,'膏剂'),(11,'霜剂'),(12,'丸剂'),(13,'凝胶剂'),(14,'喷雾剂'),(15,'洗剂'),(16,'栓剂'),(17,'其他剂型');
  122. /*!40000 ALTER TABLE `medicine_form` ENABLE KEYS */;
  123. UNLOCK TABLES;
  124. --
  125. -- Table structure for table `medicine_unit`
  126. --
  127. DROP TABLE IF EXISTS `medicine_unit`;
  128. /*!40101 SET @saved_cs_client = @@character_set_client */;
  129. /*!40101 SET character_set_client = utf8 */;
  130. CREATE TABLE `medicine_unit` (
  131. `id` int(11) NOT NULL AUTO_INCREMENT,
  132. `name` varchar(45) DEFAULT NULL,
  133. PRIMARY KEY (`id`)
  134. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  135. /*!40101 SET character_set_client = @saved_cs_client */;
  136. --
  137. -- Dumping data for table `medicine_unit`
  138. --
  139. LOCK TABLES `medicine_unit` WRITE;
  140. /*!40000 ALTER TABLE `medicine_unit` DISABLE KEYS */;
  141. INSERT INTO `medicine_unit` VALUES (0,'盒'),(1,'瓶'),(2,'袋'),(3,'支');
  142. /*!40000 ALTER TABLE `medicine_unit` ENABLE KEYS */;
  143. UNLOCK TABLES;
  144. --
  145. -- Table structure for table `medicine_otc`
  146. --
  147. DROP TABLE IF EXISTS `medicine_otc`;
  148. /*!40101 SET @saved_cs_client = @@character_set_client */;
  149. /*!40101 SET character_set_client = utf8 */;
  150. CREATE TABLE `medicine_otc` (
  151. `id` int(11) NOT NULL,
  152. `name` varchar(45) DEFAULT NULL,
  153. PRIMARY KEY (`id`)
  154. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  155. /*!40101 SET character_set_client = @saved_cs_client */;
  156. --
  157. -- Dumping data for table `medicine_otc`
  158. --
  159. LOCK TABLES `medicine_otc` WRITE;
  160. /*!40000 ALTER TABLE `medicine_otc` DISABLE KEYS */;
  161. INSERT INTO `medicine_otc` VALUES (0,'OTC类'),(1,'处方类');
  162. /*!40000 ALTER TABLE `medicine_otc` ENABLE KEYS */;
  163. UNLOCK TABLES;
  164. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  165. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  166. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  167. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  168. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  169. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  170. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  171. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  172. -- Dump completed on 2012-11-28 14:28:51