电子药箱通讯服务端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

20221123081418_Init_Entities.cs 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace Rdh.TestApi.Migrations
  4. {
  5. public partial class Init_Entities : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.CreateTable(
  10. name: "DrugInfos",
  11. columns: table => new
  12. {
  13. Id = table.Column<string>(type: "TEXT", nullable: false),
  14. Name = table.Column<string>(type: "TEXT", nullable: true),
  15. Specifications = table.Column<string>(type: "TEXT", nullable: true),
  16. Manufacturer = table.Column<string>(type: "TEXT", nullable: true),
  17. Unit = table.Column<string>(type: "TEXT", nullable: true),
  18. Creator = table.Column<string>(type: "TEXT", nullable: true),
  19. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  20. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  21. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  22. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  23. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  24. },
  25. constraints: table =>
  26. {
  27. table.PrimaryKey("PK_DrugInfos", x => x.Id);
  28. });
  29. migrationBuilder.CreateTable(
  30. name: "MedicineKits",
  31. columns: table => new
  32. {
  33. Id = table.Column<string>(type: "TEXT", nullable: false),
  34. Code = table.Column<string>(type: "TEXT", nullable: true),
  35. KitType = table.Column<int>(type: "INTEGER", nullable: false),
  36. Creator = table.Column<string>(type: "TEXT", nullable: true),
  37. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  38. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  39. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  40. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  41. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  42. },
  43. constraints: table =>
  44. {
  45. table.PrimaryKey("PK_MedicineKits", x => x.Id);
  46. });
  47. migrationBuilder.CreateTable(
  48. name: "OperationRooms",
  49. columns: table => new
  50. {
  51. Id = table.Column<string>(type: "TEXT", nullable: false),
  52. Name = table.Column<string>(type: "TEXT", nullable: true),
  53. BaseStationCode = table.Column<string>(type: "TEXT", nullable: true),
  54. Creator = table.Column<string>(type: "TEXT", nullable: true),
  55. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  56. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  57. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  58. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  59. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  60. },
  61. constraints: table =>
  62. {
  63. table.PrimaryKey("PK_OperationRooms", x => x.Id);
  64. });
  65. migrationBuilder.CreateTable(
  66. name: "Patients",
  67. columns: table => new
  68. {
  69. Id = table.Column<string>(type: "TEXT", nullable: false),
  70. Name = table.Column<string>(type: "TEXT", nullable: true),
  71. PatientNo = table.Column<string>(type: "TEXT", nullable: true),
  72. Gender = table.Column<int>(type: "INTEGER", nullable: false),
  73. BirthDay = table.Column<DateTime>(type: "TEXT", nullable: false),
  74. Creator = table.Column<string>(type: "TEXT", nullable: true),
  75. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  76. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  77. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  78. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  79. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  80. },
  81. constraints: table =>
  82. {
  83. table.PrimaryKey("PK_Patients", x => x.Id);
  84. });
  85. migrationBuilder.CreateTable(
  86. name: "Users",
  87. columns: table => new
  88. {
  89. Id = table.Column<string>(type: "TEXT", nullable: false),
  90. Name = table.Column<string>(type: "TEXT", nullable: true),
  91. Code = table.Column<string>(type: "TEXT", nullable: true),
  92. Creator = table.Column<string>(type: "TEXT", nullable: true),
  93. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  94. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  95. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  96. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  97. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  98. },
  99. constraints: table =>
  100. {
  101. table.PrimaryKey("PK_Users", x => x.Id);
  102. });
  103. migrationBuilder.CreateTable(
  104. name: "DrugBatches",
  105. columns: table => new
  106. {
  107. Id = table.Column<string>(type: "TEXT", nullable: false),
  108. BatchCode = table.Column<string>(type: "TEXT", nullable: true),
  109. ManufactureDate = table.Column<DateTime>(type: "TEXT", nullable: true),
  110. ExpiryDate = table.Column<DateTime>(type: "TEXT", nullable: false),
  111. DrugId = table.Column<string>(type: "TEXT", nullable: false),
  112. Creator = table.Column<string>(type: "TEXT", nullable: true),
  113. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  114. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  115. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  116. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  117. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  118. },
  119. constraints: table =>
  120. {
  121. table.PrimaryKey("PK_DrugBatches", x => x.Id);
  122. table.ForeignKey(
  123. name: "FK_DrugBatches_DrugInfos_DrugId",
  124. column: x => x.DrugId,
  125. principalTable: "DrugInfos",
  126. principalColumn: "Id",
  127. onDelete: ReferentialAction.Cascade);
  128. });
  129. migrationBuilder.CreateTable(
  130. name: "MedicineKitConfigs",
  131. columns: table => new
  132. {
  133. Id = table.Column<string>(type: "TEXT", nullable: false),
  134. KitType = table.Column<int>(type: "INTEGER", nullable: false),
  135. DrugId = table.Column<string>(type: "TEXT", nullable: false),
  136. MaxAmount = table.Column<int>(type: "INTEGER", nullable: false),
  137. WarnAmount = table.Column<int>(type: "INTEGER", nullable: true),
  138. Creator = table.Column<string>(type: "TEXT", nullable: true),
  139. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  140. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  141. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  142. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  143. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  144. },
  145. constraints: table =>
  146. {
  147. table.PrimaryKey("PK_MedicineKitConfigs", x => x.Id);
  148. table.ForeignKey(
  149. name: "FK_MedicineKitConfigs_DrugInfos_DrugId",
  150. column: x => x.DrugId,
  151. principalTable: "DrugInfos",
  152. principalColumn: "Id",
  153. onDelete: ReferentialAction.Cascade);
  154. });
  155. migrationBuilder.CreateTable(
  156. name: "MedicineKitLocations",
  157. columns: table => new
  158. {
  159. Id = table.Column<string>(type: "TEXT", nullable: false),
  160. MedicineKitId = table.Column<string>(type: "TEXT", nullable: false),
  161. OperationRoomId = table.Column<string>(type: "TEXT", nullable: false),
  162. Location = table.Column<int>(type: "INTEGER", nullable: false),
  163. Unit = table.Column<string>(type: "TEXT", nullable: true),
  164. Creator = table.Column<string>(type: "TEXT", nullable: true),
  165. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  166. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  167. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  168. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  169. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  170. },
  171. constraints: table =>
  172. {
  173. table.PrimaryKey("PK_MedicineKitLocations", x => x.Id);
  174. table.ForeignKey(
  175. name: "FK_MedicineKitLocations_MedicineKits_MedicineKitId",
  176. column: x => x.MedicineKitId,
  177. principalTable: "MedicineKits",
  178. principalColumn: "Id",
  179. onDelete: ReferentialAction.Cascade);
  180. table.ForeignKey(
  181. name: "FK_MedicineKitLocations_OperationRooms_OperationRoomId",
  182. column: x => x.OperationRoomId,
  183. principalTable: "OperationRooms",
  184. principalColumn: "Id",
  185. onDelete: ReferentialAction.Cascade);
  186. });
  187. migrationBuilder.CreateTable(
  188. name: "Operations",
  189. columns: table => new
  190. {
  191. Id = table.Column<string>(type: "TEXT", nullable: false),
  192. Name = table.Column<string>(type: "TEXT", nullable: true),
  193. Department = table.Column<string>(type: "TEXT", nullable: true),
  194. PatientId = table.Column<string>(type: "TEXT", nullable: false),
  195. DoctorId = table.Column<string>(type: "TEXT", nullable: false),
  196. State = table.Column<int>(type: "INTEGER", nullable: false),
  197. Creator = table.Column<string>(type: "TEXT", nullable: true),
  198. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  199. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  200. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  201. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  202. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  203. },
  204. constraints: table =>
  205. {
  206. table.PrimaryKey("PK_Operations", x => x.Id);
  207. table.ForeignKey(
  208. name: "FK_Operations_Patients_PatientId",
  209. column: x => x.PatientId,
  210. principalTable: "Patients",
  211. principalColumn: "Id",
  212. onDelete: ReferentialAction.Cascade);
  213. table.ForeignKey(
  214. name: "FK_Operations_Users_DoctorId",
  215. column: x => x.DoctorId,
  216. principalTable: "Users",
  217. principalColumn: "Id",
  218. onDelete: ReferentialAction.Cascade);
  219. });
  220. migrationBuilder.CreateTable(
  221. name: "Drugs",
  222. columns: table => new
  223. {
  224. Id = table.Column<string>(type: "TEXT", nullable: false),
  225. RFID = table.Column<string>(type: "TEXT", nullable: true),
  226. DrugBatchId1 = table.Column<string>(type: "TEXT", nullable: true),
  227. DrugBatchId = table.Column<string>(type: "TEXT", nullable: false),
  228. Creator = table.Column<string>(type: "TEXT", nullable: true),
  229. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  230. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  231. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  232. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  233. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  234. },
  235. constraints: table =>
  236. {
  237. table.PrimaryKey("PK_Drugs", x => x.Id);
  238. table.ForeignKey(
  239. name: "FK_Drugs_DrugBatches_DrugBatchId1",
  240. column: x => x.DrugBatchId1,
  241. principalTable: "DrugBatches",
  242. principalColumn: "Id",
  243. onDelete: ReferentialAction.Restrict);
  244. });
  245. migrationBuilder.CreateTable(
  246. name: "MedicineKitStocks",
  247. columns: table => new
  248. {
  249. Id = table.Column<string>(type: "TEXT", nullable: false),
  250. MedicineKitId = table.Column<string>(type: "TEXT", nullable: false),
  251. DrugId = table.Column<string>(type: "TEXT", nullable: false),
  252. MedicineKitDrugState = table.Column<int>(type: "INTEGER", nullable: false),
  253. Creator = table.Column<string>(type: "TEXT", nullable: true),
  254. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  255. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  256. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  257. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  258. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  259. },
  260. constraints: table =>
  261. {
  262. table.PrimaryKey("PK_MedicineKitStocks", x => x.Id);
  263. table.ForeignKey(
  264. name: "FK_MedicineKitStocks_Drugs_DrugId",
  265. column: x => x.DrugId,
  266. principalTable: "Drugs",
  267. principalColumn: "Id",
  268. onDelete: ReferentialAction.Cascade);
  269. table.ForeignKey(
  270. name: "FK_MedicineKitStocks_MedicineKits_MedicineKitId",
  271. column: x => x.MedicineKitId,
  272. principalTable: "MedicineKits",
  273. principalColumn: "Id",
  274. onDelete: ReferentialAction.Cascade);
  275. });
  276. migrationBuilder.CreateTable(
  277. name: "OperationDrugs",
  278. columns: table => new
  279. {
  280. Id = table.Column<string>(type: "TEXT", nullable: false),
  281. OperationId = table.Column<string>(type: "TEXT", nullable: false),
  282. DrugId = table.Column<string>(type: "TEXT", nullable: false),
  283. Creator = table.Column<string>(type: "TEXT", nullable: true),
  284. CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
  285. Modifier = table.Column<string>(type: "TEXT", nullable: true),
  286. LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
  287. IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
  288. DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
  289. },
  290. constraints: table =>
  291. {
  292. table.PrimaryKey("PK_OperationDrugs", x => x.Id);
  293. table.ForeignKey(
  294. name: "FK_OperationDrugs_Drugs_DrugId",
  295. column: x => x.DrugId,
  296. principalTable: "Drugs",
  297. principalColumn: "Id",
  298. onDelete: ReferentialAction.Cascade);
  299. table.ForeignKey(
  300. name: "FK_OperationDrugs_Operations_OperationId",
  301. column: x => x.OperationId,
  302. principalTable: "Operations",
  303. principalColumn: "Id",
  304. onDelete: ReferentialAction.Cascade);
  305. });
  306. migrationBuilder.InsertData(
  307. table: "MedicineKits",
  308. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "KitType", "LastModificationTime", "Modifier" },
  309. values: new object[] { "ffb59ddd-8448-4ffb-97e7-ef60a0f7ad91", "000", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 3, null, null });
  310. migrationBuilder.InsertData(
  311. table: "OperationRooms",
  312. columns: new[] { "Id", "BaseStationCode", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  313. values: new object[] { "c1822c7e-154d-4a0d-b038-b3f3d02c3314", "00", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "手术间1" });
  314. migrationBuilder.InsertData(
  315. table: "OperationRooms",
  316. columns: new[] { "Id", "BaseStationCode", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  317. values: new object[] { "0ae49e9f-bf4a-4315-aa38-32333c361835", "01", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "手术间2" });
  318. migrationBuilder.InsertData(
  319. table: "OperationRooms",
  320. columns: new[] { "Id", "BaseStationCode", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  321. values: new object[] { "11f05cb6-98a4-4001-a8c8-724c95c50411", "02", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "手术间3" });
  322. migrationBuilder.InsertData(
  323. table: "Patients",
  324. columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
  325. values: new object[] { "c18c3bc5-3895-418a-8f73-1e537678e7fa", new DateTime(1999, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 1, null, null, "尤梅", "10229521" });
  326. migrationBuilder.InsertData(
  327. table: "Patients",
  328. columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
  329. values: new object[] { "ea8d4c8a-bb20-4f70-95ac-d71efd5305a4", new DateTime(1975, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 0, null, null, "谷乐平", "10228969" });
  330. migrationBuilder.InsertData(
  331. table: "Patients",
  332. columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
  333. values: new object[] { "8adf25c9-fde4-4af9-a169-44564fb319dd", new DateTime(1985, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 1, null, null, "王美华", "10221218" });
  334. migrationBuilder.InsertData(
  335. table: "Patients",
  336. columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
  337. values: new object[] { "cc476616-31c5-4b99-bbf6-8e306678fb0d", new DateTime(1965, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 0, null, null, "骆元方", "10228510" });
  338. migrationBuilder.InsertData(
  339. table: "Patients",
  340. columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
  341. values: new object[] { "577d0c49-b977-49bb-b26e-d52e3858324d", new DateTime(1977, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 1, null, null, "雷胜蓝", "10251888" });
  342. migrationBuilder.InsertData(
  343. table: "Patients",
  344. columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
  345. values: new object[] { "2daa455d-d1f7-4a38-a6c4-ced217999377", new DateTime(1987, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 1, null, null, "郦夏芳", "10229717" });
  346. migrationBuilder.InsertData(
  347. table: "Patients",
  348. columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
  349. values: new object[] { "04b9b64b-ec22-4d16-b83c-3e6f016e686e", new DateTime(1995, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 0, null, null, "陶竹生", "10232853" });
  350. migrationBuilder.InsertData(
  351. table: "Patients",
  352. columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
  353. values: new object[] { "437dd193-947e-49d2-a8cf-61eced8f0699", new DateTime(1996, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 0, null, null, "张和初", "10222577" });
  354. migrationBuilder.InsertData(
  355. table: "Users",
  356. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  357. values: new object[] { "e027dc86-d1cc-48dd-9d54-d516719336fd", "bb332f54", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "刘思雨" });
  358. migrationBuilder.InsertData(
  359. table: "Users",
  360. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  361. values: new object[] { "8fdbdac2-1903-4f1f-8ed5-a51079c77cb2", "a3ce8445", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "李浩" });
  362. migrationBuilder.InsertData(
  363. table: "Users",
  364. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  365. values: new object[] { "ccac22d7-eb79-49ce-bf99-d47204812d64", "bb332e5a", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "罗岩" });
  366. migrationBuilder.InsertData(
  367. table: "Users",
  368. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  369. values: new object[] { "c57d60fc-8738-4cf4-b477-60614f03b959", "bb332e52", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "刘强与" });
  370. migrationBuilder.InsertData(
  371. table: "Users",
  372. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  373. values: new object[] { "e3c60e42-efe1-45c1-9608-831f5f1cf721", "bb332e53", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "文芳" });
  374. migrationBuilder.InsertData(
  375. table: "Users",
  376. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  377. values: new object[] { "bdca9d5d-dda0-4a04-8190-11ecae578b15", "bb332e54", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "何颖" });
  378. migrationBuilder.InsertData(
  379. table: "Users",
  380. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  381. values: new object[] { "4d997ded-50c3-4e66-b782-fe661313da4e", "bb332e55", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "张向丽" });
  382. migrationBuilder.InsertData(
  383. table: "Users",
  384. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  385. values: new object[] { "14360b6a-c7ea-4081-a613-dd8d193911be", "bb332e56", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "汪玲" });
  386. migrationBuilder.InsertData(
  387. table: "Users",
  388. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  389. values: new object[] { "a5b47d2d-ec05-4c04-a8bb-a8e11c9acdea", "bb332e57", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "李长风" });
  390. migrationBuilder.InsertData(
  391. table: "Users",
  392. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  393. values: new object[] { "b4b140fc-0723-4b06-a416-6a2c13b1cf9c", "bb332e58", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "吴爱国" });
  394. migrationBuilder.InsertData(
  395. table: "Users",
  396. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  397. values: new object[] { "0b89567d-29ac-464a-8989-53ce9590b1ed", "bb332e59", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "白丽" });
  398. migrationBuilder.InsertData(
  399. table: "Users",
  400. columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
  401. values: new object[] { "d796d486-ecec-41ac-9313-8b2dcbb081e2", "bb332e51", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "张宇" });
  402. migrationBuilder.CreateIndex(
  403. name: "IX_DrugBatches_DrugId",
  404. table: "DrugBatches",
  405. column: "DrugId");
  406. migrationBuilder.CreateIndex(
  407. name: "IX_Drugs_DrugBatchId1",
  408. table: "Drugs",
  409. column: "DrugBatchId1");
  410. migrationBuilder.CreateIndex(
  411. name: "IX_MedicineKitConfigs_DrugId",
  412. table: "MedicineKitConfigs",
  413. column: "DrugId");
  414. migrationBuilder.CreateIndex(
  415. name: "IX_MedicineKitLocations_MedicineKitId",
  416. table: "MedicineKitLocations",
  417. column: "MedicineKitId");
  418. migrationBuilder.CreateIndex(
  419. name: "IX_MedicineKitLocations_OperationRoomId",
  420. table: "MedicineKitLocations",
  421. column: "OperationRoomId");
  422. migrationBuilder.CreateIndex(
  423. name: "IX_MedicineKitStocks_DrugId",
  424. table: "MedicineKitStocks",
  425. column: "DrugId");
  426. migrationBuilder.CreateIndex(
  427. name: "IX_MedicineKitStocks_MedicineKitId",
  428. table: "MedicineKitStocks",
  429. column: "MedicineKitId");
  430. migrationBuilder.CreateIndex(
  431. name: "IX_OperationDrugs_DrugId",
  432. table: "OperationDrugs",
  433. column: "DrugId");
  434. migrationBuilder.CreateIndex(
  435. name: "IX_OperationDrugs_OperationId",
  436. table: "OperationDrugs",
  437. column: "OperationId");
  438. migrationBuilder.CreateIndex(
  439. name: "IX_Operations_DoctorId",
  440. table: "Operations",
  441. column: "DoctorId");
  442. migrationBuilder.CreateIndex(
  443. name: "IX_Operations_PatientId",
  444. table: "Operations",
  445. column: "PatientId");
  446. }
  447. protected override void Down(MigrationBuilder migrationBuilder)
  448. {
  449. migrationBuilder.DropTable(
  450. name: "MedicineKitConfigs");
  451. migrationBuilder.DropTable(
  452. name: "MedicineKitLocations");
  453. migrationBuilder.DropTable(
  454. name: "MedicineKitStocks");
  455. migrationBuilder.DropTable(
  456. name: "OperationDrugs");
  457. migrationBuilder.DropTable(
  458. name: "OperationRooms");
  459. migrationBuilder.DropTable(
  460. name: "MedicineKits");
  461. migrationBuilder.DropTable(
  462. name: "Drugs");
  463. migrationBuilder.DropTable(
  464. name: "Operations");
  465. migrationBuilder.DropTable(
  466. name: "DrugBatches");
  467. migrationBuilder.DropTable(
  468. name: "Patients");
  469. migrationBuilder.DropTable(
  470. name: "Users");
  471. migrationBuilder.DropTable(
  472. name: "DrugInfos");
  473. }
  474. }
  475. }