20240729070502_Add_SampleRegistration_InspectionOrganization.Designer.cs 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142
  1. // <auto-generated />
  2. using System;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore.Infrastructure;
  5. using Microsoft.EntityFrameworkCore.Migrations;
  6. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  7. using UniformMaterialManagementSystem.Data;
  8. #nullable disable
  9. namespace UniformMaterialManagementSystem.Migrations
  10. {
  11. [DbContext(typeof(SqliteContext))]
  12. [Migration("20240729070502_Add_SampleRegistration_InspectionOrganization")]
  13. partial class Add_SampleRegistration_InspectionOrganization
  14. {
  15. /// <inheritdoc />
  16. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  17. {
  18. #pragma warning disable 612, 618
  19. modelBuilder.HasAnnotation("ProductVersion", "7.0.20");
  20. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Company", b =>
  21. {
  22. b.Property<Guid>("Guid")
  23. .ValueGeneratedOnAdd()
  24. .HasColumnType("TEXT");
  25. b.Property<string>("Address")
  26. .HasMaxLength(100)
  27. .HasColumnType("TEXT");
  28. b.Property<string>("Category")
  29. .IsRequired()
  30. .HasMaxLength(50)
  31. .HasColumnType("TEXT");
  32. b.Property<string>("Code")
  33. .IsRequired()
  34. .HasMaxLength(50)
  35. .HasColumnType("TEXT");
  36. b.Property<bool>("IsEnabled")
  37. .HasColumnType("INTEGER");
  38. b.Property<string>("Manager")
  39. .HasMaxLength(50)
  40. .HasColumnType("TEXT");
  41. b.Property<string>("Name")
  42. .IsRequired()
  43. .HasMaxLength(50)
  44. .HasColumnType("TEXT");
  45. b.Property<string>("Note")
  46. .HasMaxLength(100)
  47. .HasColumnType("TEXT");
  48. b.Property<string>("ShortName")
  49. .IsRequired()
  50. .HasMaxLength(50)
  51. .HasColumnType("TEXT");
  52. b.Property<string>("SystemCode")
  53. .HasMaxLength(50)
  54. .HasColumnType("TEXT");
  55. b.HasKey("Guid");
  56. b.ToTable("Companies");
  57. });
  58. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Contract", b =>
  59. {
  60. b.Property<Guid>("Guid")
  61. .ValueGeneratedOnAdd()
  62. .HasColumnType("TEXT");
  63. b.Property<byte[]>("Attachment")
  64. .HasColumnType("BLOB");
  65. b.Property<Guid>("CompanyGuid")
  66. .HasColumnType("TEXT");
  67. b.Property<string>("ContractNo")
  68. .IsRequired()
  69. .HasMaxLength(50)
  70. .HasColumnType("TEXT");
  71. b.Property<DateTime>("EditDate")
  72. .HasColumnType("TEXT");
  73. b.Property<string>("EditUser")
  74. .IsRequired()
  75. .HasMaxLength(50)
  76. .HasColumnType("TEXT");
  77. b.Property<bool>("ExportStatus")
  78. .HasColumnType("INTEGER");
  79. b.Property<Guid>("PurchaseCompanyGuid")
  80. .HasColumnType("TEXT");
  81. b.Property<DateTime>("SigningDate")
  82. .HasColumnType("TEXT");
  83. b.Property<string>("Telephone")
  84. .IsRequired()
  85. .HasMaxLength(50)
  86. .HasColumnType("TEXT");
  87. b.HasKey("Guid");
  88. b.HasIndex("CompanyGuid");
  89. b.HasIndex("PurchaseCompanyGuid");
  90. b.ToTable("Contracts");
  91. });
  92. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.ContractDetail", b =>
  93. {
  94. b.Property<Guid>("Guid")
  95. .ValueGeneratedOnAdd()
  96. .HasColumnType("TEXT");
  97. b.Property<Guid>("ContractGuid")
  98. .HasColumnType("TEXT");
  99. b.Property<double>("ContractQty")
  100. .HasColumnType("REAL");
  101. b.Property<DateTime>("DeliveryTime")
  102. .HasColumnType("TEXT");
  103. b.Property<string>("InspectStatus")
  104. .IsRequired()
  105. .HasMaxLength(50)
  106. .HasColumnType("TEXT");
  107. b.Property<double>("InspectedQty")
  108. .HasColumnType("REAL");
  109. b.Property<Guid>("MaterialGuid")
  110. .HasColumnType("TEXT");
  111. b.Property<double>("ShippedQuantity")
  112. .HasColumnType("REAL");
  113. b.Property<double>("UnitPrice")
  114. .HasColumnType("REAL");
  115. b.HasKey("Guid");
  116. b.HasIndex("ContractGuid");
  117. b.HasIndex("MaterialGuid");
  118. b.ToTable("ContractDetails");
  119. });
  120. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.DeliveryReceipt", b =>
  121. {
  122. b.Property<Guid>("Guid")
  123. .ValueGeneratedOnAdd()
  124. .HasColumnType("TEXT");
  125. b.Property<Guid>("ApplyGuid")
  126. .HasColumnType("TEXT");
  127. b.Property<string>("BatchNo")
  128. .IsRequired()
  129. .HasColumnType("TEXT");
  130. b.Property<string>("CompanyName")
  131. .IsRequired()
  132. .HasColumnType("TEXT");
  133. b.Property<Guid>("ContractGuid")
  134. .HasColumnType("TEXT");
  135. b.Property<string>("ContractNo")
  136. .IsRequired()
  137. .HasColumnType("TEXT");
  138. b.Property<decimal>("ContractQty")
  139. .HasColumnType("TEXT");
  140. b.Property<DateTime>("ContractSigningDate")
  141. .HasColumnType("TEXT");
  142. b.Property<byte[]>("Licence")
  143. .HasColumnType("BLOB");
  144. b.Property<string>("MaterialName")
  145. .IsRequired()
  146. .HasColumnType("TEXT");
  147. b.Property<string>("ProductCompanyName")
  148. .IsRequired()
  149. .HasColumnType("TEXT");
  150. b.Property<string>("ReceivedCompanyName")
  151. .IsRequired()
  152. .HasColumnType("TEXT");
  153. b.Property<DateTime?>("ReceivedDate")
  154. .HasColumnType("TEXT");
  155. b.Property<string>("ReceivedMan")
  156. .HasColumnType("TEXT");
  157. b.Property<int?>("ReceivedPackets")
  158. .HasColumnType("INTEGER");
  159. b.Property<decimal?>("ReceivedQty")
  160. .HasColumnType("TEXT");
  161. b.Property<string>("ReceivedStatus")
  162. .HasColumnType("TEXT");
  163. b.Property<string>("ReceivedTel")
  164. .HasColumnType("TEXT");
  165. b.Property<DateTime>("ShippedDate")
  166. .HasColumnType("TEXT");
  167. b.Property<string>("ShippedMan")
  168. .HasColumnType("TEXT");
  169. b.Property<int>("ShippedPackets")
  170. .HasColumnType("INTEGER");
  171. b.Property<decimal>("ShippedQty")
  172. .HasColumnType("TEXT");
  173. b.Property<string>("ShippedTel")
  174. .HasColumnType("TEXT");
  175. b.HasKey("Guid");
  176. b.ToTable("DeliveryReceipts");
  177. });
  178. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.DeliveryReceiptDetail", b =>
  179. {
  180. b.Property<Guid>("Guid")
  181. .ValueGeneratedOnAdd()
  182. .HasColumnType("TEXT");
  183. b.Property<Guid>("DeliveryReceiptGuid")
  184. .HasColumnType("TEXT");
  185. b.Property<string>("PacketNo")
  186. .IsRequired()
  187. .HasColumnType("TEXT");
  188. b.Property<decimal?>("ReceiveQuantity")
  189. .HasColumnType("TEXT");
  190. b.Property<decimal>("ShippedQuantity")
  191. .HasColumnType("TEXT");
  192. b.Property<decimal?>("UseQuantity")
  193. .HasColumnType("TEXT");
  194. b.Property<string>("UseStatus")
  195. .HasColumnType("TEXT");
  196. b.HasKey("Guid");
  197. b.HasIndex("DeliveryReceiptGuid");
  198. b.ToTable("DeliveryReceiptDetails");
  199. });
  200. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApply", b =>
  201. {
  202. b.Property<Guid>("Guid")
  203. .ValueGeneratedOnAdd()
  204. .HasColumnType("TEXT");
  205. b.Property<string>("ApplyDescription")
  206. .HasMaxLength(1000)
  207. .HasColumnType("TEXT");
  208. b.Property<string>("ApplyNo")
  209. .IsRequired()
  210. .HasMaxLength(50)
  211. .HasColumnType("TEXT");
  212. b.Property<DateTime?>("ApplyReceiveDate")
  213. .HasColumnType("TEXT");
  214. b.Property<string>("ApplyUser")
  215. .IsRequired()
  216. .HasMaxLength(50)
  217. .HasColumnType("TEXT");
  218. b.Property<string>("BatchNo")
  219. .IsRequired()
  220. .HasMaxLength(50)
  221. .HasColumnType("TEXT");
  222. b.Property<string>("Company")
  223. .IsRequired()
  224. .HasMaxLength(50)
  225. .HasColumnType("TEXT");
  226. b.Property<Guid>("CompanyGuid")
  227. .HasColumnType("TEXT");
  228. b.Property<DateTime>("EndProductDate")
  229. .HasColumnType("TEXT");
  230. b.Property<string>("InspCategory")
  231. .IsRequired()
  232. .HasMaxLength(50)
  233. .HasColumnType("TEXT");
  234. b.Property<DateTime>("InspDate")
  235. .HasColumnType("TEXT");
  236. b.Property<double>("InspQuantity")
  237. .HasColumnType("REAL");
  238. b.Property<byte[]>("InspReport")
  239. .HasColumnType("BLOB");
  240. b.Property<string>("InspReportNo")
  241. .IsRequired()
  242. .HasMaxLength(50)
  243. .HasColumnType("TEXT");
  244. b.Property<bool>("LicenseStatus")
  245. .HasColumnType("INTEGER");
  246. b.Property<Guid>("MaterialGuid")
  247. .HasColumnType("TEXT");
  248. b.Property<string>("ProductName")
  249. .IsRequired()
  250. .HasMaxLength(50)
  251. .HasColumnType("TEXT");
  252. b.Property<bool>("ReportStatus")
  253. .HasColumnType("INTEGER");
  254. b.Property<bool>("SampleStatus")
  255. .HasColumnType("INTEGER");
  256. b.Property<DateTime>("StartProductDate")
  257. .HasColumnType("TEXT");
  258. b.Property<int>("Year")
  259. .HasColumnType("INTEGER");
  260. b.HasKey("Guid");
  261. b.HasIndex("CompanyGuid");
  262. b.HasIndex("MaterialGuid");
  263. b.ToTable("InspectApplies");
  264. });
  265. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApplyContractDetail", b =>
  266. {
  267. b.Property<Guid>("Guid")
  268. .ValueGeneratedOnAdd()
  269. .HasColumnType("TEXT");
  270. b.Property<Guid>("ApplyGuid")
  271. .HasColumnType("TEXT");
  272. b.Property<string>("ApplyNo")
  273. .IsRequired()
  274. .HasMaxLength(50)
  275. .HasColumnType("TEXT");
  276. b.Property<Guid>("ContractDetailGuid")
  277. .HasColumnType("TEXT");
  278. b.Property<string>("ContractNo")
  279. .IsRequired()
  280. .HasMaxLength(50)
  281. .HasColumnType("TEXT");
  282. b.Property<double>("InspectQty")
  283. .HasColumnType("REAL");
  284. b.Property<string>("PurchaseCompany")
  285. .IsRequired()
  286. .HasMaxLength(50)
  287. .HasColumnType("TEXT");
  288. b.Property<string>("PurchaseCompanyShortName")
  289. .IsRequired()
  290. .HasMaxLength(50)
  291. .HasColumnType("TEXT");
  292. b.Property<string>("SigningDate")
  293. .IsRequired()
  294. .HasMaxLength(50)
  295. .HasColumnType("TEXT");
  296. b.Property<double>("UnInspectQty")
  297. .HasColumnType("REAL");
  298. b.HasKey("Guid");
  299. b.HasIndex("ApplyGuid");
  300. b.ToTable("InspectApplyContractDetails");
  301. });
  302. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApplyDetail", b =>
  303. {
  304. b.Property<Guid>("Guid")
  305. .ValueGeneratedOnAdd()
  306. .HasColumnType("TEXT");
  307. b.Property<Guid>("ApplyGuid")
  308. .HasColumnType("TEXT");
  309. b.Property<string>("ApplyNo")
  310. .IsRequired()
  311. .HasMaxLength(50)
  312. .HasColumnType("TEXT");
  313. b.Property<string>("Note")
  314. .HasMaxLength(50)
  315. .HasColumnType("TEXT");
  316. b.Property<string>("PacketNo")
  317. .IsRequired()
  318. .HasMaxLength(50)
  319. .HasColumnType("TEXT");
  320. b.Property<double>("Quantity")
  321. .HasColumnType("REAL");
  322. b.HasKey("Guid");
  323. b.HasIndex("ApplyGuid");
  324. b.ToTable("InspectApplyDetails");
  325. });
  326. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionOrganization", b =>
  327. {
  328. b.Property<Guid>("Guid")
  329. .ValueGeneratedOnAdd()
  330. .HasColumnType("TEXT");
  331. b.Property<string>("Address")
  332. .IsRequired()
  333. .HasMaxLength(50)
  334. .HasColumnType("TEXT");
  335. b.Property<string>("Contacts")
  336. .IsRequired()
  337. .HasMaxLength(50)
  338. .HasColumnType("TEXT");
  339. b.Property<bool>("IsEnabled")
  340. .HasColumnType("INTEGER");
  341. b.Property<string>("Name")
  342. .IsRequired()
  343. .HasMaxLength(50)
  344. .HasColumnType("TEXT");
  345. b.Property<int>("OrderNo")
  346. .HasColumnType("INTEGER");
  347. b.Property<string>("Telephone")
  348. .IsRequired()
  349. .HasMaxLength(50)
  350. .HasColumnType("TEXT");
  351. b.HasKey("Guid");
  352. b.ToTable("InspectionOrganizations");
  353. });
  354. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReport", b =>
  355. {
  356. b.Property<Guid>("Guid")
  357. .ValueGeneratedOnAdd()
  358. .HasColumnType("TEXT");
  359. b.Property<string>("Conclusion")
  360. .IsRequired()
  361. .HasMaxLength(50)
  362. .HasColumnType("TEXT");
  363. b.Property<string>("ConclusionDesc")
  364. .IsRequired()
  365. .HasMaxLength(1000)
  366. .HasColumnType("TEXT");
  367. b.Property<string>("Department")
  368. .IsRequired()
  369. .HasMaxLength(50)
  370. .HasColumnType("TEXT");
  371. b.Property<string>("EditUser")
  372. .IsRequired()
  373. .HasMaxLength(50)
  374. .HasColumnType("TEXT");
  375. b.Property<Guid>("InspectApplyGuid")
  376. .HasColumnType("TEXT");
  377. b.Property<bool>("IsSample")
  378. .HasColumnType("INTEGER");
  379. b.Property<string>("ReportBasis")
  380. .IsRequired()
  381. .HasMaxLength(200)
  382. .HasColumnType("TEXT");
  383. b.Property<string>("ReportDesc")
  384. .IsRequired()
  385. .HasMaxLength(1000)
  386. .HasColumnType("TEXT");
  387. b.Property<string>("ReportNo")
  388. .IsRequired()
  389. .HasMaxLength(50)
  390. .HasColumnType("TEXT");
  391. b.Property<DateTime>("ReportTime")
  392. .HasColumnType("TEXT");
  393. b.HasKey("Guid");
  394. b.HasIndex("InspectApplyGuid");
  395. b.ToTable("InspectionReports");
  396. });
  397. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReportDetail", b =>
  398. {
  399. b.Property<Guid>("Guid")
  400. .ValueGeneratedOnAdd()
  401. .HasColumnType("TEXT");
  402. b.Property<Guid>("InspectionReportGuid")
  403. .HasColumnType("TEXT");
  404. b.Property<string>("Inspector")
  405. .IsRequired()
  406. .HasMaxLength(50)
  407. .HasColumnType("TEXT");
  408. b.Property<string>("JobCategory")
  409. .IsRequired()
  410. .HasMaxLength(50)
  411. .HasColumnType("TEXT");
  412. b.Property<string>("SupervisionUnit")
  413. .IsRequired()
  414. .HasMaxLength(50)
  415. .HasColumnType("TEXT");
  416. b.HasKey("Guid");
  417. b.HasIndex("InspectionReportGuid");
  418. b.ToTable("InspectionReportDetails");
  419. });
  420. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Material", b =>
  421. {
  422. b.Property<Guid>("Guid")
  423. .ValueGeneratedOnAdd()
  424. .HasColumnType("TEXT");
  425. b.Property<string>("CategoryCode")
  426. .IsRequired()
  427. .HasMaxLength(50)
  428. .HasColumnType("TEXT");
  429. b.Property<bool>("IsEnabled")
  430. .HasColumnType("INTEGER");
  431. b.Property<string>("MeasureUnit")
  432. .IsRequired()
  433. .HasMaxLength(50)
  434. .HasColumnType("TEXT");
  435. b.Property<string>("Name")
  436. .IsRequired()
  437. .HasMaxLength(50)
  438. .HasColumnType("TEXT");
  439. b.Property<string>("NormName")
  440. .HasMaxLength(50)
  441. .HasColumnType("TEXT");
  442. b.Property<string>("Note")
  443. .HasMaxLength(100)
  444. .HasColumnType("TEXT");
  445. b.Property<byte[]>("Photo")
  446. .HasColumnType("BLOB");
  447. b.Property<string>("ShortName")
  448. .IsRequired()
  449. .HasMaxLength(50)
  450. .HasColumnType("TEXT");
  451. b.Property<string>("Specification")
  452. .IsRequired()
  453. .HasMaxLength(50)
  454. .HasColumnType("TEXT");
  455. b.Property<string>("VarietyCode")
  456. .IsRequired()
  457. .HasMaxLength(50)
  458. .HasColumnType("TEXT");
  459. b.HasKey("Guid");
  460. b.ToTable("Materials");
  461. });
  462. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.MenuItem", b =>
  463. {
  464. b.Property<Guid>("Guid")
  465. .ValueGeneratedOnAdd()
  466. .HasColumnType("TEXT");
  467. b.Property<string>("Icon")
  468. .HasMaxLength(100)
  469. .HasColumnType("TEXT");
  470. b.Property<bool>("IsEnabled")
  471. .HasColumnType("INTEGER");
  472. b.Property<bool>("IsVisible")
  473. .HasColumnType("INTEGER");
  474. b.Property<string>("Name")
  475. .IsRequired()
  476. .HasMaxLength(50)
  477. .HasColumnType("TEXT");
  478. b.Property<int>("OrderIndex")
  479. .HasColumnType("INTEGER");
  480. b.Property<Guid?>("ParentGuid")
  481. .HasColumnType("TEXT");
  482. b.Property<string>("Path")
  483. .HasMaxLength(100)
  484. .HasColumnType("TEXT");
  485. b.HasKey("Guid");
  486. b.HasIndex("ParentGuid");
  487. b.ToTable("MenuItems");
  488. });
  489. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Role", b =>
  490. {
  491. b.Property<Guid>("Guid")
  492. .ValueGeneratedOnAdd()
  493. .HasColumnType("TEXT");
  494. b.Property<string>("Description")
  495. .IsRequired()
  496. .HasMaxLength(100)
  497. .HasColumnType("TEXT");
  498. b.Property<bool>("IsEnabled")
  499. .HasColumnType("INTEGER");
  500. b.Property<string>("Name")
  501. .IsRequired()
  502. .HasMaxLength(50)
  503. .HasColumnType("TEXT");
  504. b.HasKey("Guid");
  505. b.ToTable("Roles");
  506. });
  507. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.RoleMenuItem", b =>
  508. {
  509. b.Property<Guid>("MenuItemGuid")
  510. .HasColumnType("TEXT");
  511. b.Property<Guid>("RoleGuid")
  512. .HasColumnType("TEXT");
  513. b.HasKey("MenuItemGuid", "RoleGuid");
  514. b.HasIndex("RoleGuid");
  515. b.ToTable("RoleMenuItems");
  516. });
  517. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.SampleRegistration", b =>
  518. {
  519. b.Property<Guid>("Guid")
  520. .ValueGeneratedOnAdd()
  521. .HasColumnType("TEXT");
  522. b.Property<string>("BatchNo")
  523. .IsRequired()
  524. .HasMaxLength(50)
  525. .HasColumnType("TEXT");
  526. b.Property<string>("Department")
  527. .IsRequired()
  528. .HasMaxLength(50)
  529. .HasColumnType("TEXT");
  530. b.Property<DateTime>("EditTime")
  531. .HasColumnType("TEXT");
  532. b.Property<string>("EditUser")
  533. .IsRequired()
  534. .HasMaxLength(50)
  535. .HasColumnType("TEXT");
  536. b.Property<Guid>("InspectApplyGuid")
  537. .HasColumnType("TEXT");
  538. b.Property<string>("InspectionOrganization")
  539. .IsRequired()
  540. .HasMaxLength(500)
  541. .HasColumnType("TEXT");
  542. b.Property<string>("PacketNo")
  543. .IsRequired()
  544. .HasMaxLength(50)
  545. .HasColumnType("TEXT");
  546. b.Property<DateTime>("ProductDate")
  547. .HasColumnType("TEXT");
  548. b.Property<string>("ProductUsers")
  549. .HasMaxLength(100)
  550. .HasColumnType("TEXT");
  551. b.Property<double>("Quantity")
  552. .HasColumnType("REAL");
  553. b.Property<string>("SampleNo")
  554. .IsRequired()
  555. .HasMaxLength(50)
  556. .HasColumnType("TEXT");
  557. b.Property<string>("SingleIndexItem")
  558. .HasMaxLength(50)
  559. .HasColumnType("TEXT");
  560. b.Property<string>("Telephone")
  561. .HasMaxLength(50)
  562. .HasColumnType("TEXT");
  563. b.Property<string>("TestingItem")
  564. .IsRequired()
  565. .HasMaxLength(50)
  566. .HasColumnType("TEXT");
  567. b.HasKey("Guid");
  568. b.HasIndex("InspectApplyGuid");
  569. b.ToTable("SampleRegistrations");
  570. });
  571. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.SerialNumber", b =>
  572. {
  573. b.Property<Guid>("Guid")
  574. .ValueGeneratedOnAdd()
  575. .HasColumnType("TEXT");
  576. b.Property<string>("CompanyCode")
  577. .IsRequired()
  578. .HasMaxLength(50)
  579. .HasColumnType("TEXT");
  580. b.Property<Guid>("CompanyGuid")
  581. .HasColumnType("TEXT");
  582. b.Property<string>("InspCategory")
  583. .IsRequired()
  584. .HasMaxLength(50)
  585. .HasColumnType("TEXT");
  586. b.Property<string>("MaxNumber")
  587. .IsRequired()
  588. .HasMaxLength(50)
  589. .HasColumnType("TEXT");
  590. b.Property<Guid>("SupervisionUnitGuid")
  591. .HasColumnType("TEXT");
  592. b.Property<int>("Year")
  593. .HasColumnType("INTEGER");
  594. b.HasKey("Guid");
  595. b.ToTable("SerialNumbers");
  596. });
  597. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.SupervisionUnit", b =>
  598. {
  599. b.Property<Guid>("Guid")
  600. .ValueGeneratedOnAdd()
  601. .HasColumnType("TEXT");
  602. b.Property<bool>("IsEnabled")
  603. .HasColumnType("INTEGER");
  604. b.Property<string>("Name")
  605. .IsRequired()
  606. .HasMaxLength(50)
  607. .HasColumnType("TEXT");
  608. b.Property<string>("Note")
  609. .HasMaxLength(100)
  610. .HasColumnType("TEXT");
  611. b.Property<string>("ShortName")
  612. .IsRequired()
  613. .HasMaxLength(50)
  614. .HasColumnType("TEXT");
  615. b.HasKey("Guid");
  616. b.ToTable("SupervisionUnits");
  617. });
  618. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.User", b =>
  619. {
  620. b.Property<Guid>("Guid")
  621. .ValueGeneratedOnAdd()
  622. .HasColumnType("TEXT");
  623. b.Property<Guid?>("CompanyGuid")
  624. .HasColumnType("TEXT");
  625. b.Property<string>("CompanyName")
  626. .HasMaxLength(50)
  627. .HasColumnType("TEXT");
  628. b.Property<string>("IdNumber")
  629. .IsRequired()
  630. .HasMaxLength(50)
  631. .HasColumnType("TEXT");
  632. b.Property<bool>("IsEnabled")
  633. .HasColumnType("INTEGER");
  634. b.Property<string>("LoginName")
  635. .IsRequired()
  636. .HasMaxLength(50)
  637. .HasColumnType("TEXT");
  638. b.Property<string>("Password")
  639. .IsRequired()
  640. .HasMaxLength(50)
  641. .HasColumnType("TEXT");
  642. b.Property<DateTime>("RegisterDate")
  643. .HasColumnType("TEXT");
  644. b.Property<string>("Salt")
  645. .IsRequired()
  646. .HasMaxLength(50)
  647. .HasColumnType("TEXT");
  648. b.Property<Guid>("SupervisionUnitGuid")
  649. .HasColumnType("TEXT");
  650. b.Property<string>("UserName")
  651. .IsRequired()
  652. .HasMaxLength(50)
  653. .HasColumnType("TEXT");
  654. b.HasKey("Guid");
  655. b.HasIndex("CompanyGuid");
  656. b.HasIndex("SupervisionUnitGuid");
  657. b.ToTable("Users");
  658. });
  659. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.UserRole", b =>
  660. {
  661. b.Property<Guid>("RoleGuid")
  662. .HasColumnType("TEXT");
  663. b.Property<Guid>("UserGuid")
  664. .HasColumnType("TEXT");
  665. b.HasKey("RoleGuid", "UserGuid");
  666. b.HasIndex("UserGuid");
  667. b.ToTable("UserRoles");
  668. });
  669. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Contract", b =>
  670. {
  671. b.HasOne("UniformMaterialManagementSystem.Entities.Company", "Company")
  672. .WithMany()
  673. .HasForeignKey("CompanyGuid")
  674. .OnDelete(DeleteBehavior.Cascade)
  675. .IsRequired();
  676. b.HasOne("UniformMaterialManagementSystem.Entities.Company", "PurchaseCompany")
  677. .WithMany()
  678. .HasForeignKey("PurchaseCompanyGuid")
  679. .OnDelete(DeleteBehavior.Cascade)
  680. .IsRequired();
  681. b.Navigation("Company");
  682. b.Navigation("PurchaseCompany");
  683. });
  684. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.ContractDetail", b =>
  685. {
  686. b.HasOne("UniformMaterialManagementSystem.Entities.Contract", "Contract")
  687. .WithMany("ContractDetails")
  688. .HasForeignKey("ContractGuid")
  689. .OnDelete(DeleteBehavior.Cascade)
  690. .IsRequired();
  691. b.HasOne("UniformMaterialManagementSystem.Entities.Material", "Material")
  692. .WithMany()
  693. .HasForeignKey("MaterialGuid")
  694. .OnDelete(DeleteBehavior.Cascade)
  695. .IsRequired();
  696. b.Navigation("Contract");
  697. b.Navigation("Material");
  698. });
  699. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.DeliveryReceiptDetail", b =>
  700. {
  701. b.HasOne("UniformMaterialManagementSystem.Entities.DeliveryReceipt", null)
  702. .WithMany("DeliveryReceiptDetails")
  703. .HasForeignKey("DeliveryReceiptGuid")
  704. .OnDelete(DeleteBehavior.Cascade)
  705. .IsRequired();
  706. });
  707. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApply", b =>
  708. {
  709. b.HasOne("UniformMaterialManagementSystem.Entities.Company", "MaterialCompany")
  710. .WithMany()
  711. .HasForeignKey("CompanyGuid")
  712. .OnDelete(DeleteBehavior.Cascade)
  713. .IsRequired();
  714. b.HasOne("UniformMaterialManagementSystem.Entities.Material", "Material")
  715. .WithMany()
  716. .HasForeignKey("MaterialGuid")
  717. .OnDelete(DeleteBehavior.Cascade)
  718. .IsRequired();
  719. b.Navigation("Material");
  720. b.Navigation("MaterialCompany");
  721. });
  722. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApplyContractDetail", b =>
  723. {
  724. b.HasOne("UniformMaterialManagementSystem.Entities.InspectApply", "InspectApply")
  725. .WithMany("InspectApplyContractDetails")
  726. .HasForeignKey("ApplyGuid")
  727. .OnDelete(DeleteBehavior.Cascade)
  728. .IsRequired();
  729. b.Navigation("InspectApply");
  730. });
  731. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApplyDetail", b =>
  732. {
  733. b.HasOne("UniformMaterialManagementSystem.Entities.InspectApply", "InspectApply")
  734. .WithMany("InspectApplyDetails")
  735. .HasForeignKey("ApplyGuid")
  736. .OnDelete(DeleteBehavior.Cascade)
  737. .IsRequired();
  738. b.Navigation("InspectApply");
  739. });
  740. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReport", b =>
  741. {
  742. b.HasOne("UniformMaterialManagementSystem.Entities.InspectApply", "InspectApply")
  743. .WithMany()
  744. .HasForeignKey("InspectApplyGuid")
  745. .OnDelete(DeleteBehavior.Cascade)
  746. .IsRequired();
  747. b.Navigation("InspectApply");
  748. });
  749. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReportDetail", b =>
  750. {
  751. b.HasOne("UniformMaterialManagementSystem.Entities.InspectionReport", "InspectionReport")
  752. .WithMany("InspectionReportDetails")
  753. .HasForeignKey("InspectionReportGuid")
  754. .OnDelete(DeleteBehavior.Cascade)
  755. .IsRequired();
  756. b.Navigation("InspectionReport");
  757. });
  758. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.MenuItem", b =>
  759. {
  760. b.HasOne("UniformMaterialManagementSystem.Entities.MenuItem", "Parent")
  761. .WithMany("Children")
  762. .HasForeignKey("ParentGuid")
  763. .OnDelete(DeleteBehavior.Restrict);
  764. b.Navigation("Parent");
  765. });
  766. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.RoleMenuItem", b =>
  767. {
  768. b.HasOne("UniformMaterialManagementSystem.Entities.MenuItem", "MenuItem")
  769. .WithMany("MenuRoles")
  770. .HasForeignKey("MenuItemGuid")
  771. .OnDelete(DeleteBehavior.Cascade)
  772. .IsRequired();
  773. b.HasOne("UniformMaterialManagementSystem.Entities.Role", "Role")
  774. .WithMany("RoleMenus")
  775. .HasForeignKey("RoleGuid")
  776. .OnDelete(DeleteBehavior.Cascade)
  777. .IsRequired();
  778. b.Navigation("MenuItem");
  779. b.Navigation("Role");
  780. });
  781. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.SampleRegistration", b =>
  782. {
  783. b.HasOne("UniformMaterialManagementSystem.Entities.InspectApply", "InspectApply")
  784. .WithMany()
  785. .HasForeignKey("InspectApplyGuid")
  786. .OnDelete(DeleteBehavior.Cascade)
  787. .IsRequired();
  788. b.Navigation("InspectApply");
  789. });
  790. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.User", b =>
  791. {
  792. b.HasOne("UniformMaterialManagementSystem.Entities.Company", "Company")
  793. .WithMany()
  794. .HasForeignKey("CompanyGuid");
  795. b.HasOne("UniformMaterialManagementSystem.Entities.SupervisionUnit", "SupervisionUnit")
  796. .WithMany()
  797. .HasForeignKey("SupervisionUnitGuid")
  798. .OnDelete(DeleteBehavior.Cascade)
  799. .IsRequired();
  800. b.Navigation("Company");
  801. b.Navigation("SupervisionUnit");
  802. });
  803. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.UserRole", b =>
  804. {
  805. b.HasOne("UniformMaterialManagementSystem.Entities.Role", "Role")
  806. .WithMany("UserRoles")
  807. .HasForeignKey("RoleGuid")
  808. .OnDelete(DeleteBehavior.Cascade)
  809. .IsRequired();
  810. b.HasOne("UniformMaterialManagementSystem.Entities.User", "User")
  811. .WithMany("UserRoles")
  812. .HasForeignKey("UserGuid")
  813. .OnDelete(DeleteBehavior.Cascade)
  814. .IsRequired();
  815. b.Navigation("Role");
  816. b.Navigation("User");
  817. });
  818. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Contract", b =>
  819. {
  820. b.Navigation("ContractDetails");
  821. });
  822. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.DeliveryReceipt", b =>
  823. {
  824. b.Navigation("DeliveryReceiptDetails");
  825. });
  826. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApply", b =>
  827. {
  828. b.Navigation("InspectApplyContractDetails");
  829. b.Navigation("InspectApplyDetails");
  830. });
  831. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReport", b =>
  832. {
  833. b.Navigation("InspectionReportDetails");
  834. });
  835. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.MenuItem", b =>
  836. {
  837. b.Navigation("Children");
  838. b.Navigation("MenuRoles");
  839. });
  840. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Role", b =>
  841. {
  842. b.Navigation("RoleMenus");
  843. b.Navigation("UserRoles");
  844. });
  845. modelBuilder.Entity("UniformMaterialManagementSystem.Entities.User", b =>
  846. {
  847. b.Navigation("UserRoles");
  848. });
  849. #pragma warning restore 612, 618
  850. }
  851. }
  852. }