spDbContextModelSnapshot.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. // <auto-generated />
  2. using System;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore.Infrastructure;
  5. using Microsoft.EntityFrameworkCore.Metadata;
  6. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  7. using wispro.sp.api;
  8. namespace wispro.sp.api.Migrations
  9. {
  10. [DbContext(typeof(spDbContext))]
  11. partial class spDbContextModelSnapshot : ModelSnapshot
  12. {
  13. protected override void BuildModel(ModelBuilder modelBuilder)
  14. {
  15. #pragma warning disable 612, 618
  16. modelBuilder
  17. .HasAnnotation("Relational:Collation", "Chinese_PRC_CI_AS")
  18. .HasAnnotation("Relational:MaxIdentifierLength", 128)
  19. .HasAnnotation("ProductVersion", "5.0.9")
  20. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  21. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  22. {
  23. b.Property<int>("Id")
  24. .HasColumnType("int");
  25. b.Property<string>("Address")
  26. .HasMaxLength(500)
  27. .HasColumnType("nvarchar(500)");
  28. b.Property<string>("ContactMan")
  29. .HasMaxLength(50)
  30. .HasColumnType("nvarchar(50)");
  31. b.Property<string>("Name")
  32. .IsRequired()
  33. .HasMaxLength(200)
  34. .HasColumnType("nvarchar(200)");
  35. b.Property<string>("Phone")
  36. .HasMaxLength(50)
  37. .HasColumnType("nvarchar(50)");
  38. b.Property<int?>("ResponseManId")
  39. .HasColumnType("int");
  40. b.HasKey("Id");
  41. b.HasIndex("ResponseManId");
  42. b.ToTable("Customer");
  43. });
  44. modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
  45. {
  46. b.Property<int>("ItemId")
  47. .HasColumnType("int");
  48. b.Property<int>("DoPersonId")
  49. .HasColumnType("int");
  50. b.Property<double>("PerformancePoint")
  51. .HasColumnType("float");
  52. b.HasKey("ItemId", "DoPersonId");
  53. b.HasIndex("DoPersonId");
  54. b.ToTable("ItemStaff");
  55. });
  56. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  57. {
  58. b.Property<int>("Id")
  59. .ValueGeneratedOnAdd()
  60. .HasColumnType("int")
  61. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  62. b.Property<string>("AgentFeedbackMemo")
  63. .HasColumnType("nvarchar(max)");
  64. b.Property<string>("ApplicationName")
  65. .HasMaxLength(200)
  66. .HasColumnType("nvarchar(200)");
  67. b.Property<string>("ApplicationType")
  68. .HasMaxLength(50)
  69. .HasColumnType("nvarchar(50)");
  70. b.Property<decimal?>("BasePoint")
  71. .HasColumnType("numeric(18,2)");
  72. b.Property<string>("BusinessType")
  73. .HasMaxLength(50)
  74. .HasColumnType("nvarchar(50)");
  75. b.Property<string>("CaseCoefficient")
  76. .HasMaxLength(10)
  77. .HasColumnType("nvarchar(10)");
  78. b.Property<string>("CaseName")
  79. .HasMaxLength(500)
  80. .HasColumnType("nvarchar(500)");
  81. b.Property<string>("CaseNo")
  82. .HasMaxLength(50)
  83. .HasColumnType("nvarchar(50)");
  84. b.Property<string>("CaseStage")
  85. .HasMaxLength(50)
  86. .HasColumnType("nvarchar(50)");
  87. b.Property<string>("CaseState")
  88. .HasMaxLength(50)
  89. .HasColumnType("nvarchar(50)");
  90. b.Property<string>("CaseType")
  91. .HasMaxLength(50)
  92. .HasColumnType("nvarchar(50)");
  93. b.Property<int?>("CustomerId")
  94. .HasColumnType("int");
  95. b.Property<DateTime?>("CustomerLimitDate")
  96. .HasColumnType("date");
  97. b.Property<string>("DoItem")
  98. .HasMaxLength(50)
  99. .HasColumnType("nvarchar(50)");
  100. b.Property<string>("DoItemCoefficient")
  101. .HasMaxLength(50)
  102. .HasColumnType("nvarchar(50)");
  103. b.Property<string>("DoItemMemo")
  104. .HasMaxLength(500)
  105. .HasColumnType("nvarchar(500)");
  106. b.Property<string>("DoItemState")
  107. .HasMaxLength(50)
  108. .HasColumnType("nvarchar(50)");
  109. b.Property<DateTime?>("EntrustingDate")
  110. .HasColumnType("date");
  111. b.Property<DateTime?>("FinalizationDate")
  112. .HasColumnType("date");
  113. b.Property<DateTime?>("FinishedDate")
  114. .HasColumnType("date");
  115. b.Property<DateTime?>("FirstDraftDate")
  116. .HasColumnType("date");
  117. b.Property<DateTime?>("InternalDate")
  118. .HasColumnType("date");
  119. b.Property<int>("Month")
  120. .HasColumnType("int");
  121. b.Property<string>("OverDueMemo")
  122. .HasMaxLength(100)
  123. .HasColumnType("nvarchar(100)");
  124. b.Property<int?>("PreOastaffId")
  125. .HasColumnType("int")
  126. .HasColumnName("PreOAStaffId");
  127. b.Property<DateTime?>("ReturnDate")
  128. .HasColumnType("date");
  129. b.Property<int?>("ReviewerId")
  130. .HasColumnType("int");
  131. b.Property<int?>("StaffId")
  132. .HasColumnType("int");
  133. b.Property<int?>("Status")
  134. .HasColumnType("int")
  135. .HasColumnName("status");
  136. b.Property<int>("Year")
  137. .HasColumnType("int");
  138. b.HasKey("Id");
  139. b.HasIndex("CustomerId");
  140. b.HasIndex("PreOastaffId");
  141. b.HasIndex("ReviewerId");
  142. b.HasIndex("StaffId");
  143. b.ToTable("PerformanceItem");
  144. });
  145. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  146. {
  147. b.Property<int>("Id")
  148. .HasColumnType("int");
  149. b.Property<string>("Account")
  150. .IsRequired()
  151. .HasMaxLength(50)
  152. .HasColumnType("nvarchar(50)");
  153. b.Property<string>("Department")
  154. .HasMaxLength(50)
  155. .HasColumnType("nvarchar(50)");
  156. b.Property<DateTime?>("EntyDate")
  157. .HasColumnType("date");
  158. b.Property<bool>("IsCalPerformsnce")
  159. .HasColumnType("bit")
  160. .HasColumnName("isCalPerformsnce");
  161. b.Property<string>("Memo")
  162. .HasColumnType("nvarchar(max)");
  163. b.Property<string>("Name")
  164. .IsRequired()
  165. .HasMaxLength(50)
  166. .HasColumnType("nvarchar(50)");
  167. b.Property<string>("Password")
  168. .IsRequired()
  169. .HasColumnType("nvarchar(max)");
  170. b.Property<int>("StaffGradeId")
  171. .HasColumnType("int");
  172. b.Property<string>("Status")
  173. .IsRequired()
  174. .HasMaxLength(25)
  175. .HasColumnType("nvarchar(25)");
  176. b.Property<string>("WorkPlace")
  177. .HasMaxLength(50)
  178. .HasColumnType("nvarchar(50)");
  179. b.HasKey("Id");
  180. b.HasIndex("StaffGradeId");
  181. b.ToTable("Staff");
  182. });
  183. modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
  184. {
  185. b.Property<int>("Id")
  186. .ValueGeneratedOnAdd()
  187. .HasColumnType("int")
  188. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  189. b.Property<double>("Coefficient")
  190. .HasColumnType("float");
  191. b.Property<string>("Grade")
  192. .IsRequired()
  193. .HasMaxLength(5)
  194. .HasColumnType("nchar(5)")
  195. .IsFixedLength(true);
  196. b.HasKey("Id");
  197. b.ToTable("StaffGrade");
  198. b.HasData(
  199. new
  200. {
  201. Id = 1,
  202. Coefficient = 1.2,
  203. Grade = "S级"
  204. },
  205. new
  206. {
  207. Id = 2,
  208. Coefficient = 1.1000000000000001,
  209. Grade = "A3级"
  210. },
  211. new
  212. {
  213. Id = 3,
  214. Coefficient = 1.1000000000000001,
  215. Grade = "A2级"
  216. },
  217. new
  218. {
  219. Id = 4,
  220. Coefficient = 1.1000000000000001,
  221. Grade = "A1级"
  222. },
  223. new
  224. {
  225. Id = 5,
  226. Coefficient = 1.0,
  227. Grade = "B3级"
  228. },
  229. new
  230. {
  231. Id = 6,
  232. Coefficient = 1.0,
  233. Grade = "B2级"
  234. },
  235. new
  236. {
  237. Id = 7,
  238. Coefficient = 0.90000000000000002,
  239. Grade = "B1级"
  240. },
  241. new
  242. {
  243. Id = 8,
  244. Coefficient = 0.90000000000000002,
  245. Grade = "C3级"
  246. },
  247. new
  248. {
  249. Id = 9,
  250. Coefficient = 0.69999999999999996,
  251. Grade = "C2级"
  252. },
  253. new
  254. {
  255. Id = 10,
  256. Coefficient = 0.69999999999999996,
  257. Grade = "C1级"
  258. },
  259. new
  260. {
  261. Id = 11,
  262. Coefficient = 0.59999999999999998,
  263. Grade = "D3级"
  264. },
  265. new
  266. {
  267. Id = 12,
  268. Coefficient = 0.59999999999999998,
  269. Grade = "D2级"
  270. },
  271. new
  272. {
  273. Id = 13,
  274. Coefficient = 0.5,
  275. Grade = "D1级"
  276. });
  277. });
  278. modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
  279. {
  280. b.Property<int>("CheckerId")
  281. .HasColumnType("int");
  282. b.Property<int>("DoPersonId")
  283. .HasColumnType("int");
  284. b.Property<double>("Coefficient")
  285. .HasColumnType("float");
  286. b.HasKey("CheckerId", "DoPersonId");
  287. b.HasIndex("DoPersonId");
  288. b.ToTable("VerifyCoefficient");
  289. b.HasData(
  290. new
  291. {
  292. CheckerId = 2,
  293. DoPersonId = 5,
  294. Coefficient = 0.20000000000000001
  295. },
  296. new
  297. {
  298. CheckerId = 2,
  299. DoPersonId = 6,
  300. Coefficient = 0.20000000000000001
  301. },
  302. new
  303. {
  304. CheckerId = 2,
  305. DoPersonId = 7,
  306. Coefficient = 0.20000000000000001
  307. },
  308. new
  309. {
  310. CheckerId = 2,
  311. DoPersonId = 8,
  312. Coefficient = 0.20000000000000001
  313. },
  314. new
  315. {
  316. CheckerId = 2,
  317. DoPersonId = 9,
  318. Coefficient = 0.29999999999999999
  319. },
  320. new
  321. {
  322. CheckerId = 2,
  323. DoPersonId = 10,
  324. Coefficient = 0.29999999999999999
  325. },
  326. new
  327. {
  328. CheckerId = 2,
  329. DoPersonId = 11,
  330. Coefficient = 0.40000000000000002
  331. },
  332. new
  333. {
  334. CheckerId = 2,
  335. DoPersonId = 12,
  336. Coefficient = 0.40000000000000002
  337. },
  338. new
  339. {
  340. CheckerId = 2,
  341. DoPersonId = 13,
  342. Coefficient = 0.5
  343. },
  344. new
  345. {
  346. CheckerId = 3,
  347. DoPersonId = 5,
  348. Coefficient = 0.20000000000000001
  349. },
  350. new
  351. {
  352. CheckerId = 3,
  353. DoPersonId = 6,
  354. Coefficient = 0.20000000000000001
  355. },
  356. new
  357. {
  358. CheckerId = 3,
  359. DoPersonId = 7,
  360. Coefficient = 0.20000000000000001
  361. },
  362. new
  363. {
  364. CheckerId = 3,
  365. DoPersonId = 8,
  366. Coefficient = 0.20000000000000001
  367. },
  368. new
  369. {
  370. CheckerId = 3,
  371. DoPersonId = 9,
  372. Coefficient = 0.29999999999999999
  373. },
  374. new
  375. {
  376. CheckerId = 3,
  377. DoPersonId = 10,
  378. Coefficient = 0.29999999999999999
  379. },
  380. new
  381. {
  382. CheckerId = 3,
  383. DoPersonId = 11,
  384. Coefficient = 0.40000000000000002
  385. },
  386. new
  387. {
  388. CheckerId = 3,
  389. DoPersonId = 12,
  390. Coefficient = 0.40000000000000002
  391. },
  392. new
  393. {
  394. CheckerId = 3,
  395. DoPersonId = 13,
  396. Coefficient = 0.5
  397. },
  398. new
  399. {
  400. CheckerId = 4,
  401. DoPersonId = 5,
  402. Coefficient = 0.20000000000000001
  403. },
  404. new
  405. {
  406. CheckerId = 4,
  407. DoPersonId = 6,
  408. Coefficient = 0.20000000000000001
  409. },
  410. new
  411. {
  412. CheckerId = 4,
  413. DoPersonId = 7,
  414. Coefficient = 0.20000000000000001
  415. },
  416. new
  417. {
  418. CheckerId = 4,
  419. DoPersonId = 8,
  420. Coefficient = 0.20000000000000001
  421. },
  422. new
  423. {
  424. CheckerId = 4,
  425. DoPersonId = 9,
  426. Coefficient = 0.29999999999999999
  427. },
  428. new
  429. {
  430. CheckerId = 4,
  431. DoPersonId = 10,
  432. Coefficient = 0.29999999999999999
  433. },
  434. new
  435. {
  436. CheckerId = 4,
  437. DoPersonId = 11,
  438. Coefficient = 0.40000000000000002
  439. },
  440. new
  441. {
  442. CheckerId = 4,
  443. DoPersonId = 12,
  444. Coefficient = 0.40000000000000002
  445. },
  446. new
  447. {
  448. CheckerId = 4,
  449. DoPersonId = 13,
  450. Coefficient = 0.5
  451. });
  452. });
  453. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  454. {
  455. b.HasOne("wispro.sp.entity.Staff", "ResponseMan")
  456. .WithMany("Customers")
  457. .HasForeignKey("ResponseManId")
  458. .HasConstraintName("FK_Customer_Staff");
  459. b.Navigation("ResponseMan");
  460. });
  461. modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
  462. {
  463. b.HasOne("wispro.sp.entity.Staff", "DoPerson")
  464. .WithMany("ItemStaffs")
  465. .HasForeignKey("DoPersonId")
  466. .HasConstraintName("FK_ItemStaff_Staff")
  467. .IsRequired();
  468. b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
  469. .WithMany("ItemStaffs")
  470. .HasForeignKey("ItemId")
  471. .HasConstraintName("FK_ItemStaff_PerformanceItem")
  472. .IsRequired();
  473. b.Navigation("DoPerson");
  474. b.Navigation("Item");
  475. });
  476. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  477. {
  478. b.HasOne("wispro.sp.entity.Customer", "Customer")
  479. .WithMany("PerformanceItems")
  480. .HasForeignKey("CustomerId")
  481. .HasConstraintName("FK_PerformanceItem_Customer");
  482. b.HasOne("wispro.sp.entity.Staff", "PreOastaff")
  483. .WithMany()
  484. .HasForeignKey("PreOastaffId")
  485. .HasConstraintName("FK_PerformanceItem_Staff");
  486. b.HasOne("wispro.sp.entity.Staff", "Reviewer")
  487. .WithMany("ReviewerItems")
  488. .HasForeignKey("ReviewerId")
  489. .HasConstraintName("FK_PerformanceItem_Reviewer");
  490. b.HasOne("wispro.sp.entity.Staff", null)
  491. .WithMany("PerformanceItems")
  492. .HasForeignKey("StaffId");
  493. b.Navigation("Customer");
  494. b.Navigation("PreOastaff");
  495. b.Navigation("Reviewer");
  496. });
  497. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  498. {
  499. b.HasOne("wispro.sp.entity.StaffGrade", "StaffGrade")
  500. .WithMany("Staff")
  501. .HasForeignKey("StaffGradeId")
  502. .HasConstraintName("FK_Staff_StaffGrade")
  503. .IsRequired();
  504. b.Navigation("StaffGrade");
  505. });
  506. modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
  507. {
  508. b.HasOne("wispro.sp.entity.StaffGrade", "Checker")
  509. .WithMany("VerifyCoefficientCheckers")
  510. .HasForeignKey("CheckerId")
  511. .HasConstraintName("FK_VerifyCoefficient_StaffGrade")
  512. .IsRequired();
  513. b.HasOne("wispro.sp.entity.StaffGrade", "DoPerson")
  514. .WithMany("VerifyCoefficientDoPeople")
  515. .HasForeignKey("DoPersonId")
  516. .HasConstraintName("FK_VerifyCoefficient_StaffGrade1")
  517. .IsRequired();
  518. b.Navigation("Checker");
  519. b.Navigation("DoPerson");
  520. });
  521. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  522. {
  523. b.Navigation("PerformanceItems");
  524. });
  525. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  526. {
  527. b.Navigation("ItemStaffs");
  528. });
  529. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  530. {
  531. b.Navigation("Customers");
  532. b.Navigation("ItemStaffs");
  533. b.Navigation("PerformanceItems");
  534. b.Navigation("ReviewerItems");
  535. });
  536. modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
  537. {
  538. b.Navigation("Staff");
  539. b.Navigation("VerifyCoefficientCheckers");
  540. b.Navigation("VerifyCoefficientDoPeople");
  541. });
  542. #pragma warning restore 612, 618
  543. }
  544. }
  545. }